ComboX

Impose ComboBox like behavior on arbitrary control.

To create ComboX control, first create any kind of control and initialize it using Set function.  After that, control will be stay visible only from the moment it is shown (via Show or Toggle) until it losses focus.  You can optionally create trigger button for the ComboX control that will be used for showing and positioning of the control.

(see ComboX.png)

Dependency

Win 1.24++

Summary
ComboXImpose ComboBox like behavior on arbitrary control.
HideHide ComboX control.
SetInitializes control as a ComboX control.
ShowShow ComboX control.
ToggleToggle ComboX control.
About

Hide

ComboX_Hide(HCtrl)

Hide ComboX control.

Parameters

hComboHandle of the control.

Set

ComboX_Set(HCtrl,  
Options = "",
Handler = "")

Initializes control as a ComboX control.

Parameters

HCtrlHandle of the control to be affected.
HandlerNotification handler.  Optional.
OptionsSpace separated list of options, see below.  Optional, by default “Esc Enter”.

Options

Space, Esc, Enter, ClickSpecifing one or more of these keys controls when to hide ComboX control.
HwndHandle of the glue control in integer format.  This control represents the “arrow button” in normal ComboBox control.  When ComboX control is shown, it will be positioned relative to the glue control.
PHWLetters specifying how control is positioned relative to the glue control.  P specifies on which corner of glue control to bind (1..4), W how width is expanded L (left) R(right), H how height is expanded U (up) D (down).  For instance 4LD mimic standard ComboBox control.

Handler

OnComboX( Hwnd, Event )
HwndHandle of the control that triggered event.
Event”Show”, “Hide” or “Select”.  Space and Enter will trigger “Select” event after control is hidden.  Esc and loosing focus will triger “Hide” event after control is hidden.  “Show” event is triggered before control is shown as a call to Show or Toggle functions.

Remarks

Some controls may have their g labels not working after being set as ComboX control.

Show

ComboX_Show(HCtrl,  
X = "",
Y = "",
W = "",
H = "")

Show ComboX control.  Sets ComboX_Active to currently shown control.

Parameters

HCtrlHandle of the control.
X,Y,W,HOptional screen coordinates on which to show control and its width and height.

Toggle

ComboX_Toggle(HCtrl)

Toggle ComboX control.

Parameters

HCtrlHandle of the control.

About

ComboX_Hide(HCtrl)
Hide ComboX control.
ComboX_Set(HCtrl,  
Options = "",
Handler = "")
Initializes control as a ComboX control.
ComboX_Show(HCtrl,  
X = "",
Y = "",
W = "",
H = "")
Show ComboX control.
ComboX_Toggle(HCtrl)
Toggle ComboX control.
Close