VtSelectionDialog(1vtcl)
VtSelectionDialog --
create selection dialog, return widget name
Synopsis
VtSelectionDialog widgetName [options]
Description
Creates a Selection dialog which contains a set of widgets
that allows the user to select an item from a list or type
the item in a text field. The text field is automatically
updated to the item selected from the list. All the Dialog
options are available to this widget. Returns the dialog widget's name.
By default, Selection dialogs have an OK, Cancel, and Help
button. To override the default buttons, the options
-ok, -cancel, and -help can be used to specify
which buttons go in the dialog. If any one of
these options is used then it is assumed that only
buttons which have been individually specified or
referenced via either a label or a callback option will
be put in the dialog.
If the user chooses either the OK or Cancel button,
the dialog is automatically popped down and destroyed, and
the user's selection passed as a parameter to the OK callback.
To override this default -autoHide and -autoDestroy
options can be used.
For example, to display a Selection dialog with the
choices a, b or c:
set sb [VtSelectionDialog $but.sb -itemList {{a} {b} {c}}]
VtShow $sb
Options
-filename string (CS)-
Sets a file (named string) that
contains the list of items. Each line of the
file is considered a list item. The full pathname of the file must
be specified.
-itemList list (CS)-
Sets the list of items for the selection box.
-selection string (CSG)-
Sets the value of the selection in the selection text widget
to string.
The item in the list is not highlighted.
Return values
If VtSelectionDialog fails,
it returns one of the following error messages:
Standard errors-
See
``Tcl widget creation errors'' in Developing Visual Tcl applications.
25 April 2004
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004