Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Droplist Widget Properties


Droplist widgets display a single entry from a list of possible choices. To choose from the list, click the droplist, then click on the item in the list. On Motif operating systems, the droplist widget looks like a button, which when clicked displays the drop-down list.

When programming in IDL, you create droplist widgets using the WIDGET_DROPLIST function. For more information, see WIDGET_DROPLIST.

Droplist Widget Attributes

For droplist widgets, you can set common attributes and droplist-specific attributes. For a list of common attributes, see Common Attributes. These are the droplist attributes:

Initial Value

The Initial Value attribute specifies the initial list of values that are placed in the droplist widget. The initial value of a droplist can be a scalar string, or it can be a list of strings. By default, this value is not set, and the droplist is empty.

To enter more than one string in the Value field, type in a string, then press Control+Enter (at the end of each line). This moves you to the next line. When you have entered as many strings as you want, press Enter to set the values.

In the generated *.pro file, this value is specified with the VALUE keyword to the widget creation routine.

Tab Mode

The Tab Mode attribute specifies what support the widget has for receiving or losing focus through tabbing. By default, this value is set to Inherit.

Note
It is not possible to tab to disabled (Sensitive = False) or hidden (Visible = False) widgets.

Allowable values are:

Value
Description
Inherit
Upon creation, the widget inherits the tabbing support of the parent base.
None
Disallow tabbing into or out of the widget.
In and Out
Allow tabbing into and out of the widget.
In Only
Allow tabbing into the widget only.
Out Only
Allow tabbing off of the widget only.

Note
The default tab mode of a widget is Inherit. The tabbing support defined for the parent base, described in Base Widget Attributes, is inherited by widget children unless otherwise specified.

Note
In widget applications on the UNIX platform, the Motif library controls what widgets are brought into and released from focus using tabbing. The TAB_MODE keyword value is always zero, and any attempt to change it is ignored when running a widget application on the UNIX platform.

In the generated *.pro file, this value is specified with the TAB_MODE keyword to the widget creation routine. For more information on tabbing among widgets, see Tabbing in Widget Applications.

Title

The Title attribute specifies the title string, or label, for the droplist. This value can be any string. By default, this value is set to NULL.

In the generated *.pro file, this value is specified by the TITLE keyword to the widget creation routine.

Droplist Widget Events

For droplist widgets, you can set common event properties and droplist-specific event properties. By default, event values are not set. For a list of events common to all widgets, see Common Events.

This is the event property specific to droplist widgets:

OnSelectValue

The OnSelectValue specifies the routine that is called when a droplist item is selected. When a user selects an item from a droplist, the widget deselects the previously selected item, changes the visible item on the droplist, and generates an event.

When you set this event value, the calling sequence looks like this in the generated *_eventcb.pro file:

pro <RoutineName>, Event 

where RoutineName is the name of the event procedure you specify. Event is the event structure returned when a user selects an item from a droplist. The event structure is of the following type:

{ WIDGET_DROPLIST, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L } 

INDEX returns the index of the selected item. This value can be used to index the array of names originally used to set the widget's value.

Note
On some platforms, when a droplist widget contains only one item and the user selects it again, the action does note not generate an event. Events are always generated on selection actions if the list contains multiple items.


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]