|
See the file man.macros. NAMEtixCheckList - Create and manipulate tixCheckList widgetsSYNOPSIStixCheckList pathName ?options?SUPER-CLASSThe TixCheckList class is derived from the TixTree class and inherits all the commands, options and subwidgets of its super-class.STANDARD OPTIONSTixCheckList supports all the standard options of a frame widget. See the options(n) manual entry for details on the standard options.WIDGET-SPECIFIC OPTIONS[-browsecmd browseCmd] Specifies a command to call whenever the user browses on an entry (usually by single-clicking on the entry). The command is called with one argument, the pathname of the entry. [-command command] Specifies a command to call whenever the user activates an entry (usually by double-clicking on the entry). The command is called with one argument, the pathname of the entry. [-radio radio] A Boolean value. If set to true, the user can select at most one item at a time; if set to false, the user can select as many items as possible.SUBWIDGETSName: hlist Class: TixHList
Name: hsb Class: Scrollbar
Name: vsb Class: Scrollbar
DESCRIPTIONThe tixCheckList command creates a new window (given by the pathName argument) and makes it into a CheckList widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the CheckList widget such as its cursor and relief.The CheckList widget displays a list of items to be selected by the user. CheckList acts similarly to the Tk checkbutton or radiobutton widgets, except it is capable of handling many more items than checkbuttons or radiobuttons. The items are contained in the hlist subwidget. Each item may be in one of the following status: on (indicated by a check bitmap), off (indicated by a cross bitmap) default (indicated by a gray box bitmap) or none, in which case the item will not be accompanied by a bitmap. The items whose status is on, off or default are called the selectable items and can be checked or crossed by the user. All selectable entries must be of the type imagetext. The items whose status is none cannot be checked or crossed by the user; usually they are included in the hlist subwidget only for explanation purposes or as separators. Initially, all the items have a none status. To make an item selectable, you can call the setstatus command to change its status (see below). Notice that CheckList is a subclass of the TixTree widget and thus is is capable of displaying a hierachy of selectable entries. When necessary, you can call the setmode method (see TixTree(n)) to define the hierachical structure of the selectable entries. WIDGET COMMANDSThe tixCheckList command creates a new Tcl command whose name is the same as the path name of the CheckList's window. This command may be used to invoke various operations on the widget. It has the following general form:pathName option ?arg arg ...?
PathName is the name of the command, which is the same as the CheckList
widget's path name. Option and the args determine the exact
behavior of the command. The following commands are possible for CheckList
widgets:
EXAMPLEThis example creates several choices for the user to select.set c [tixCheckList .c] $c subwidget hlist add choice1 -itemtype imagetext -text Choice1 $c subwidget hlist add choice2 -itemtype imagetext -text Choice2 $c subwidget hlist add choice3 -itemtype imagetext -text Choice3 $c setstatus choice1 on $c setstatus choice2 off $c setstatus choice3 off pack $c BINDINGSThe basic mouse and keyboard bindings of the CheckList widget are the same as the bindings of the TixTree widget.In addition, the status of the entries in the CheckList are toggled under the following conditions:
KEYWORDSTix(n), tixHList(n), tixTree(n)
Visit the GSP FreeBSD Man Page Interface. |