DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Introducing SCO Visual Tcl

Widget naming

Most SCO Visual Tcl commands create widgets. These commands are given a ``handle'' for the widget comprised of the widget's parent and its desired name. The server then returns the full name of the created widget.


NOTE: There is no guarantee that the returned name will always be exactly the same as the given parent/name handle.

Widgets are hierarchically named in a manner reflecting the widget tree. The full name of the widget gives the widget's name, its parents and ancestors, each widget name in the name hierarchy is separated by a period (.). For example, widget a.b.c describes widget c, which is a child of widget b, which is itself a child of widget a.

Widget names that need to be referenced must be unique; by default the servers enforce this -- an error is displayed when you try to specify a name that already exists.

When a name is given in one of the widget creation routines, it must be composed of an existing parent with the required name tail appended. For example, if a.b.c is a PushButton it can be created with code similar to this:

           VtPushButton .a.b.c -label ...
The parent, a.b, must already exist or the command will fail.

Once a widget is created, there are commands to manipulate its state, usually by changing the values of options. These commands require the widget's name.


Next topic: Widget layout
Previous topic: Parents and children

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