NAME

checkButton - Create and manipulate a checkbutton

SYNOPSIS

checkButton ?-option optionVal ...?

OPTIONS

-text
text or icon of the button
type: string
default: ""
-command
Tcl command which is executed if the button is pressed

Before evaluating every percent (%) and its following character is substituted in command:
%% by %,
%v by value onValue or offValue dependent on the state of the button,
%w by the widget-ID

type: string
default: ""
-variable
Name of a (global) variable which is changed if the state of the button changes. If the variable does not exist, it is created with a value of offValue. If it does exist and has the same value than onValue, the checkbutton is selected. If the variable is set externaly (e.g. via the set command) to onValue or offValue, command is called and the state of the widget changed.
type: string
default: ""
-onValue
value to store in the button's associated variable whenever this button is selected
type: string
default: 1
-offValue
value to store in the button's associated variable whenever this button is not selected
type: string
default: 0
-indicatorOn
Determines whether or not the toggle button is drawn on screen
type: boolean
default: true
-tooltip
Message that appear next to this widget when the mouse pointer is held over it for a short amount of time.
type: string
default: ""
-sensitive
Wheather or not the item is sensitve to user input.
type: boolean
default: 1

DESCRIPTION

A checkbutton is like a button, but it has two states: on and off.

WIDGET COMMANDS

The checkButton command creates a new Tcl command whose name is an ID returned on widget creation. This command may be used to invoke various operations on the widget. It has the following general form:

ID option ?arg arg ...?

option and arg determine the exact behavior of the command. The following commands are possible for checkButton widgets:
ID getValue
Returns value of onValue or offValue depending on the state of the widget.
ID setValue value
Sets the state of the widget, changes variable and calls command. value must be either value of onValue or offValue.
ID invoke
Does just what would have happened if the user invoked the checkbutton with the mouse: toggle the selection state of the button and invoke the Tcl command associated with the checkbutton, if there is one. This command is ignored if the checkbutton's state is not sensitve.

KEYWORDS


Copyright © 2001 - 2002 P. G. Baum