HTBasic Help
×
Menu
Index

Combo Widget

 
_______________________________________________________
COMBO Widget
Creates a scrollable list of items
_______________________________________________________
 
Legal Usage                Level-0 Widget:                Yes
                 Parent to:                None
                 Child of:                        PANEL
 
Example Image
 
     
 
Example Program
 
See COMBO Widget for an example program that creates a COMBO widget with a display similar to that shown above. In this program, the SELECTION and RETURN events are used to call a handler routine that gets the TEXT returned by the widget, while the handler searches through the ITEMS array attempting to find a match.
 
NOTE
 
See the following program for another example using the COMBO widget:
 
          COMBO Test
 
Attributes
 
See COMBO Widget Attributes for the COMBO widget attribute list.
 
Remarks
 
The COMBO widget is a combination of the STRING widget and the LIST widget that creates a scrollable list of items. The COMBO widget is similar to the LIST widget in that the current selection is displayed in the listbox.
 
The COMBO widget allows you to present a list of ITEMS to the user, and to return text through the TEXT attribute from that list or a string input by the user.The COMBO widget uses events to detect when it is activated.
 
When a selection from the listbox is complete, the listbox is hidden, leaving only the selection field and the listbox actuator remaining.
 
The vertical resize borders act differently for this widget than it does for others. Instead of changing the widget's height, the listbox proportion changes. The same is true for HEIGHT and ROWS attributes.
 
To employ the COMBO display resizing corners, pull the rubberband box to the size you choose, and release the mouse button. When the listbox appears, it will appear at that size. Only the vertical scrollbar appears in this widget - there is no horizontal scrollbar.
 
Events
 
Events for the COMBO widget are:
 
·
KEYSTROKE
·
RETURN
·
SELECTION
·
SYSTEM MENU
 
KEYSTROKE
 
Occurs when you type a character in the selection field.
 
RETURN
 
Occurs when you press the Return key.
 
SELECTION
 
Occurs when you select an item from the listbox.
 
SYSTEM MENU
 
This event is generated when the operator selects items from the SYSTEM MENU.