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)
Win 1.24++
ComboX_Set( HCtrl, Options = "", Handler = "" )
Initializes control as a ComboX control.
HCtrl | Handle of the control to be affected. |
Handler | Notification handler. Optional. |
Options | Space separated list of options, see below. Optional, by default “Esc Enter”. |
Space, Esc, Enter, Click | Specifing one or more of these keys controls when to hide ComboX control. |
Hwnd | Handle 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. |
PHW | Letters 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. |
OnComboX( Hwnd, Event )
Hwnd | Handle 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. |
Some controls may have their g labels not working after being set as ComboX control.
Hide ComboX control.
ComboX_Hide( HCtrl )
Initializes control as a ComboX control.
ComboX_Set( HCtrl, Options = "", Handler = "" )
Show ComboX control.
ComboX_Show( HCtrl, X = "", Y = "", W = "", H = "" )
Toggle ComboX control.
ComboX_Toggle( HCtrl )