overview.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
About Combination-Box Controls (1.2)
Using Section  Message Group  Styles            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
                       About Combination-Box Controls
 
This section describes how to use combination-box controls to let the user
choose and edit items from a list. Before reading this section, you should
be familiar with entry-field controls, list-box controls, messages and
message queues, and standard user-interface guidelines.
 
Combination-box controls, also called combination boxes, are a new feature
of MS OS/2 version 1.2. They can be used in addition to entry-field controls
(see Entry-field controls).
 
A combination box is two controls in one: an entry field and a list box.
Combination boxes let the user enter data by typing in the entry field or by
choosing from a list in the list box.
 
A combination box automatically manages the interaction between the entry
field and the list box. For example, when the user chooses an item in the
list box, the combination box displays the text for that item in the entry
field. The user can then edit the text without affecting the item in the
list box. When the user types a letter in the entry field, the combination
box scrolls the list box contents so that items beginning with that letter
become visible.
 
A combination box can have one of the following styles:
 
Style             Meaning
────────────────────────────────────────────────────────────────────────────
CBS_SIMPLE        A simple combination box. A simple combination box always
                  displays its list box. The user can enter and edit text in
                  the entry field or choose items from the list box.
 
CBS_DROPDOWN      A drop-down combination box. A simple drop-down
                  combination box displays its list box only if the user
                  clicks the drop-down icon at the right end of the entry
                  field. It hides the list box when the user clicks the icon
                  a second time. In a drop-down combination box, the user
                  can enter and edit text in the entry field or choose items
                  from the list box.
 
CBS_DROPDOWNLIST  A drop-down-list combination box is similar to the
                  drop-down combination box, but the user can choose items
                  only from the list box. The user cannot enter or edit text
                  in the entry field.
 
For combination boxes that have the CBS_DROPDOWN or CBS_DROPDOWNLIST style,
an application can show the list by using the CBM_SHOWLIST message. An
application can determine whether the list is already showing by using the
CBM_ISLISTSHOWING message.
 
Applications can use any of the entry-field (EM_) and list-box (LM_)
messages with combination boxes. Entry-field messages affect the entry
field; list-box messages affect the list box. For example, an application
can use the LM_INSERTITEM message to insert items into the list box.
 
A combination box sends a variety of notification messages to its parent
window. These notification messages are similar to the notification messages
sent by entry-field and list-box controls. For example, the combination box
sends a CBN_EFCHANGE notification message when the user changes text in the
entry field and sends a CBN_LBSELECT when the user chooses an item in the
list box.
 
 
                                      ♦