Creating the process list (VtList, VxSetVar)
The CreateList procedure
fills in the list of processes to manipulate.
CreateList is defined at the top of the program. As
usual, the parent of the list (``form'') is passed in.
Also specified:
-
the number of rows visible to the user (using -rows 9)
-
the default callback used when a user double-clicks on a
list item (MenuKillCB, as specified by -defaultCallback)
The handle of the created list widget ($list_wid) will be
needed by other procedures and callbacks to perform actions on the list.
Two options to make this widget available are:
-
Declare the variable list_wid to be a global variable.
-
Pass this list widget as a parameter directly to all
procedures and callbacks needing it.
Either of these would be acceptable for such a small application.
But, for larger applications, use
VxSetVar(VTCL),
a special SCO Visual Tcl command that allows for sharing
widget information.
Next topic:
Attaching variables to a form (VxSetVar)
Previous topic:
Creating menu buttons (VtPushButton)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003