DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Command options by class

Object class options

Object class options govern the general attributes of all widgets created with these SCO Visual Tcl commands:

VtCheckBox VtComboBox VtDrawnList
VtErrorDialog VtFileSelectionDialog VtForm
VtFormDialog VtFrame VtInformationDialog
VtLabel VtList VtMenuBar
VtMessageDialog VtOptionMenu VtPulldown
VtPushButton VtQuestionDialog VtRadioBox
VtRowColumn VtScale VtSelectionDialog
VtSeparator VtText VtToggleButton
VtWarningDialog VtWorkingDialog  

The following object class options are available:


-allowDuplicateName boolean (CS)
Allows you to create objects with duplicated names. Use this option only if you do not intend to reference the object. A typical use of this option could be in a menu routine where references to the separators are not needed. Referencing an object with duplicated names is undefined and not supported.

-autoLock list of callback procedure names (C)
Locks the server process before calling a callback. The server will lock itself (that is, not accept any more input) before calling any of the callbacks specified in the list. The lock is exactly the same as calling VtLock(1vtcl). You must remember to unlock the application by calling VtUnLock(1vtcl).

For example:

proc lockCB {cbs} {
    sleep 5
    VtUnLock
}
.
.
.
set ap [VtOpen Lock]
set dlog [VtFormDialog $ap.form ]
VtPushButton $dlog.Lock  -callback lockCB -autoLock lockCB
VtShow $dlog
VtMainLoop
autoLock is typically used in cases where you are changing the current form and you do not want the user to be able to access the form while those changes are being made (for example, if you are stippling fields in the current form).

-background (CS)
Sets the background color of the widget to one of the symbolic color names defined in the SCO Visual Tcl application resource file. Pre-defined colors are:

-baseLineList (G)
Gets the list of baselines for a widget. In character mode, this always returns 0. The baseline is the distance from the top of the widget to the baseline of the font for the text within the widget.

-borderWidth integer (CS)
Sets the width of the border in pixels. In character mode, if the borderWidth is 0, the border is turned off; if 1 the border is single-lined; if greater than 1 the border is double-lined.

-errorCallback cmd (CS)
Sets command cmd as the handler to be called when an error occurs in a callback. When an error occurs SCO Visual Tcl travels up the object tree until it finds an error callback to handle the error.

Additional callback keys are:


result
Tcl return string

callback
callback that encountered the error

returnCode
Tcl return code

-focusDirection string (S)
Specifies the direction in which the focus moves with respect to this widget. Directions are:

HOME
first widget in this widget's <Tab> group

DOWN
widget below this one

UP
widget above this one

LEFT
widget to the left of this one

RIGHT
widget to the right of this one

NEXT
next widget in child order

PREVIOUS
previous widget in child order

PREVIOUS_TAB_GROUP
previous <Tab> group

NEXT_TAB_GROUP
next <Tab> group

-font string (CS)
Sets the fontList of an object to symbolic font names defined in the SCO Visual Tcl application resource file. Pre-defined font names are:

For example:

VtPushButton $parent.button -font largePlainFont


-foreground (CS)
Sets the foreground color of the widget to one of the symbolic color names defined in the SCO Visual Tcl application resource file. Pre-defined colors are:

-height integer (CSG)
Sets the height of the widget (pixels for OSF/Motif, character units for character mode). Note that widget must be ``managed'' before this value can be retrieved with VtGet(1vtcl). (If the object has -rows as an option, this may be a more convenient way of setting its height.)

-helpKeyCallback cmd (CS)
Sets the help callback for an object. This callback is called when the <F1> keypress is received by the object. The callback structure returns a keyed list.

An additional callback key, tree, is a widget tree token used by help system.


-hidden boolean (CSG)
Specifies whether the object is displayed or not displayed after creation. By default, all non-dialog objects are displayed when created.

-popupMenu string (CS)
Specifies the menu name to pop up when a menu button or key is pressed (usually, the right mouse button or <F4> key on an OSF/Motif server). The menu must have already been created with VtPulldown(1vtcl).

-sensitive boolean (CSG)
Determines whether the widget receives input events. If set to ``False'', the widget will be grayed and will not accept events. The default value is ``True''.

-shortHelpCallback cmd (CS)
Sets the cmd to call when the mouse button enters or leaves a widget.

An additional callback key, helpString, sets the shortHelpString for the widget.


-shortHelpString string (CSG)
Sets the string that is sent to the shortHelpCallback.

-shortHelpTarget string (CSG)
string is the name of a label or text widget in which to display the shortHelpString.

-width integer (CSG)
Sets the width of the widget (pixels for OSF/Motif, character units for character mode). Note that the widget must be ``managed'' before this value can be obtained by VtGet(1vtcl).

-takeFocus flag (S)
Specifies that this widget should take the focus.

-userData string (CSG)
Sets any string that you want to attach to any widget. This is typically used to attach comment information to widgets that can be retrieved later using VtGet(1vtcl).

-xmArgs string (CS)
Sets Motif resources that have not been implemented. The Motif resources specified with xmArgs are passed to the widget creation and manipulation commands, as described in the Motif Reference Manual. For example, the following changes the background of the button to blue and the foreground to red:
VtPushButton $fn.but \
-xmArgs {XmNbackground blue \
XmNforeground red}

-xPos pixels | chars (CSG)
Sets the X position of the widget within its parent in the appropriate units (pixels for OSF/Motif, characters for character mode). For dialog widgets, this specifies the X position on the screen.

-yPos pixels | chars (CSG)
Sets the Y position of the widget within its parent in the appropriate units (pixels for OSF/Motif, characters for character mode). For dialog widgets, this specifies the Y position on the screen.
See also: ``Geometry class options''
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004