DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

VtSelectionDialog(VTCL)


VtSelectionDialog -- create selection dialog, return widget name

Syntax

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.

Errors


Standard errors
See ``Tcl widget creation errors'' in SCO Visual Tcl Programmer's Guide and Reference.

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003