[ Team LiB ] Previous Section Next Section

Button Operations

Table 30-2 summarizes the operations on button widgets. In the table, $w is a button, checkbutton, radiobutton, or menubutton, except when noted. For the most part, these operations are used by the script libraries that implement the bindings for buttons. The cget and configure operations are the most commonly used by applications.

Table 30-2. Button operations

$w cget option

Returns the value of the specified attribute.

$w configure ?option? ?value? ...

Queries or manipulates the configuration information for the widget.

$w deselect

Deselects the radiobutton or checkbutton. Set the radiobutton variable to the null string. Set the checkbutton variable to the off value.

$w flash

Redisplays the button several times in alternate colors.

$w invoke

Invokes the command associated with the button.

$w select

Selects the radiobutton or checkbutton, setting the associated variable appropriately.

$w toggle

Toggles the state of the checkbutton, setting the associated variable appropriately.

    [ Team LiB ] Previous Section Next Section