tixSelect - Create and manipulate tixSelect widgets


SYNOPSIS

tixSelect pathName ?options?

SUPER-CLASS

The TixSelect
class is derived from the TixLabelWidget
class and inherits all the commands, options and subwidgets of its super-class.

STANDARD OPTIONS

The Select widget supports all the standard options of a frame widget. See the options(n) manual entry for details on the standard options.

WIDGET-SPECIFIC OPTIONS


Name:		allowZero
Class:		AllowZero
Switch:		-allowzero


Name:		buttonType
Class:		ButtonType
Switch:		-buttontype


Name:		command
Class:		Command
Switch:		-command


Name:		disableCallback
Class:		DisableCallback
Switch:		-disablecallback


Name:		orientation
Class:		Orientation
Switch:		-orientation
Alias:		-orient


Name:		label
Class:		Label
Switch:		-label


Name:		labelSide
Class:		LabelSide
Switch:		-labelside


Name:		padX
Class:		Pad
Switch:		-padx


Name:		padY
Class:		Pad
Switch:		-padx


Name:		radio
Class:		Radio
Switch:		-radio


Name:		selectedBg
Class:		SelectedBg
Switch:		-selectedbg


Name:		state
Class:		State
Switch:		-state


Name:		validateCmd
Class:		ValidateCmd
Switch:		-validatecmd


Name:		value
Class:		Value
Switch:		-value


Name:		variable
Class:		Variable
Switch:		-variable

SUBWIDGETS


Name:		label
Class:		Label

In addition, all the button subwidgets created as a result of the add widget command can be accessed by the subwidget command. They are identified by the buttonName parameter to the add widget command. Here is an example:


	tixSelect .s
	pack .s
	.s add eat   -text Eat
	.s add sleep -text Sleep
	.s subwidget eat   config -fg green
	.s subwidget sleep config -fg red

DESCRIPTION

The tixSelect command creates a new window (given by the pathName argument) and makes it into a Select widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Select widget such as its cursor and relief. The Select widget is a container of button subwidgets. It can be used to provide radio-box or check-box style of selection options for the user.

WIDGET COMMANDS

The tixSelect command creates a new Tcl command whose name is 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 determine the exact behavior of the command. The following commands are possible for Select widgets:
pathName add buttonName ?option value ... ?
Adds a new button subwidget with the name buttonName into the Select widget. Additional configuration options can be given to configure the new button subwidget.
pathName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixSelect command.
pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the tixSelect command.
pathName invoke buttonName
Invokes the button subwidget with the name buttonName.
pathName subwidget name ?args?
When no options are given, returns the pathname of the subwidget of the specified name. When options are given, the widget command of the specified subwidget will be called with these options.

BINDINGS

When the user presses the left mouse button over the a button subwidget, it will be toggled and the -value option of the tixSelect widget will be changed.

EXAMPLE

The following example creates a radio-box style iconbar for the user to choose one value among eat, work or sleep.


	tixSelect .s -radio true -allowzero false
	.s add eat   -bitmap [tix getbitmap eat]
	.s add work  -bitmap [tix getbitmap work]
	.s add sleep -bitmap [tix getbitmap sleep]

KEYWORDS

Tix(n), Container Widget
Last modified Sun Jan 19 22:34:38 EST 1997 --- Serial 853731305