|
|||||||||
![]() |
After all you may have already wondered what
a ComboBox widget looks like. Below is a screenshot showing two combo boxes:
A ComboBox consists of an ordinary input field with a down pointing arrow besides it. When you click on that arrow, a list pops up just below that input area. You can now browse in the list or hide it by clicking on the arrow buttons once more. ComboBoxes come in two flavours: either with an editable or non-editable input field. In the latter case the user is restricted to choose only items, that are present in the list. If a ComboBox has an editable text input area, the user is free to enter in the input field whatever he wants.
A ComboBox widget is somewhere in between of an ordinary XmTextField widget and a XmList. In contrast to a list widget, a ComboBox almost only occupies the same space on screen as a XmTextField. If the user wants to get a more detailed oversight of all available items, he can pop up the list. ComboBoxes first appeared in that "Windoze" GUI. They are now considered part of the COSE specification. But I provide you this widget without the need to upgrade to a buggy and costly new Motif 2.0 release. As you might know: never buy a 1.0 release. The same applies to 2.0 releases, too! My implementation of a ComboBox widget not only has the usual mouse support but it also features full keyboard support. In case of a non-editable ComboBox, the user can quickly move to any item within the list by pressing the same letter key as the item starts with. Motif hackers might be interested in the "mirroring" of children's resources. In fact, the XmComboBox widget is a container. When instantiated, it creates a few other children and then manages the flow of information between these children and the application. Therefore a lot of new resources belong to these children. But the ComboBox handles setting and retrieving resource values completely transparent, thus you don't have to bother with all these implementation details.
Contents: Harald Albrecht (albrecht@igpm.rwth-aachen.de) Layout: Harald Albrecht Last Change: 97/08/10 (ab) |