<manpage cat="widget" id="checkbutton" title="checkbutton" version="0.2">
<!-- This file was automatically generated.  DO NOT EDIT (yet)! -->
<!-- 
     Copyright (c) 2004 Joe English
 -->
<?TROFF.TH title="checkbutton" section="n" date="0.2" source="tile" manual="Tile Widget Set" ?>
<namesection>
<name>ttk::checkbutton</name>
<desc>On/off widget</desc>
</namesection>
<synopsis>
<syntax>
<b>ttk::checkbutton</b> <m>pathName</m> ?<m>options</m>?
</syntax>
</synopsis>
<section>
<title>DESCRIPTION</title>
<p>A <b cat="AMBIGUOUS widget cmd">checkbutton</b> widget is used to show or change a setting.
It has two states, selected and deselected.  
The state of the checkbutton may be linked to a Tcl variable.
</p>
</section>
<section>
<title>STANDARD OPTIONS</title>
<sl cat="stdopt" cols="4">
<li>-class</li>
<li>-compound</li>
<li>-cursor</li>
<li>-image</li>
<li>-state</li>
<li>-style</li>
<li>-takefocus</li>
<li>-text</li>
<li>-textvariable</li>
<li>-underline</li>
<li>-width</li>
</sl>
</section>
<section>
<title>OPTIONS</title>
<optionlist>
<optiondef>
<name>-command</name>
<dbname>command</dbname>
<dbclass>Command</dbclass>
<desc>A Tcl script to execute whenever the widget is invoked.
</desc>
</optiondef>
<optiondef>
<name>-offvalue</name>
<dbname>offValue</dbname>
<dbclass>OffValue</dbclass>
<desc>The value to store in the associated <i>-variable</i> 
when the widget is deselected.  Defaults to <b>0</b>.
</desc>
</optiondef>
<optiondef>
<name>-onvalue</name>
<dbname>onValue</dbname>
<dbclass>OnValue</dbclass>
<desc>The value to store in the associated <i>-variable</i> 
when the widget is selected.  Defaults to <b>1</b>.
</desc>
</optiondef>
<optiondef>
<name>-variable</name>
<dbname>variable</dbname>
<dbclass>Variable</dbclass>
<desc>The name of a global variable whose value is linked to the widget.
Defaults to the widget pathname if not specified.
</desc>
</optiondef>
</optionlist>
</section>
<section>
<title>WIDGET COMMAND</title>
<p>In addition to the standard 
<b>cget</b>, <b>configure</b>, <b>instate</b>, and <b>state</b> 
commands, checkbuttons support the following additional
widget commands:
</p>
<dl>
<dle>
<dt><m>pathname</m> invoke</dt>
<dd>Toggles between the selected and deselected states
and evaluates the associated <i>-command</i>.
If the widget is currently selected, sets the <i>-variable</i>
to the <i>-offvalue</i> and deselects the widget;
otherwise, sets the <i>-variable</i> to the <i>-onvalue</i>
Returns the result of the <i>-command</i>.
</dd>
</dle>
</dl>
</section>
<section>
<title>WIDGET STATES</title>
<p>The widget does not respond to user input if the <b>disabled</b> state is set.
The widget sets the <b>selected</b> state whenever 
the linked <b>-variable</b> is set to the widget's <b>-onvalue</b>,
and clears it otherwise.
The widget sets the <b>alternate</b> state whenever the 
linked <b>-variable</b> is unset.  
(The <b>alternate</b> state may be used to indicate a ``tri-state'' 
or ``indeterminate'' selection.)
</p>
</section>
<seealso>
<ref>widget(n)</ref>
<ref>keynav(n)</ref>
<ref>radiobutton(n)</ref>
</seealso>
<keywords>
<keyword>widget</keyword>
<keyword>button</keyword>
<keyword>toggle</keyword>
<keyword>check</keyword>
<keyword>option</keyword>
</keywords>
</manpage>
