Description
This Tk widget enables you to select from a list of items. Depending on
the length of the list, either a menu or a scrollable listbox is used
for the selection. This is useful because for very long lists, you
don't want a menu.
If a menu is created, then the button that this widget makes is
just a normal menu button. If a listbox is made, then the button
is just a plain button. When you press it, the listbox is created
close to the button.
With the listbox, there is an associated entry box into which you can
type, and the the list is searched and the match highlighted as you
type. If you hit carriage return, then the selection is made. Alternatively
you could click on the highlighted entry.
Whenever a selection is made, this widget emits an event called select. T $value of this event is a record with two fields.
Field ``item'' contains the name of the selected item.
Field ``index'' conatain the index of the selected item
from the constructor list.
The widget accepts an event called setwidth. It is the same as
calling the setwidth tool
function.
An example of the operation of this widget can be viewed in the measures
GUI (start with dm.gui()), and goto e.g. Frame -> Which direction ->
Source.
Next: selectablelist - Constructor
Up: widgets - Module
Previous: scrolltext.vscrollbar - Function
 
Contents
 
Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15