File: checkbutton.html

package info (click to toggle)
tile 0.8.2-2.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 3,152 kB
  • ctags: 3,093
  • sloc: ansic: 18,144; tcl: 4,607; makefile: 398; sh: 71
file content (94 lines) | stat: -rw-r--r-- 5,979 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>Tile package reference: checkbutton</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.12 $">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid8221fd8">NAME</a>  <a href="#SECTid8222050">SYNOPSIS</a>  <a href="#SECTid8222118">DESCRIPTION</a>  <a href="#SECTid82221b8">STANDARD OPTIONS</a>  <a href="#SECTid82223e8">OPTIONS</a>  <a href="#SECTid8222820">WIDGET COMMAND</a>  <a href="#SECTid8222af0">WIDGET STATES</a>  <a href="#SECTid8222c80">SEE ALSO</a>  <a href="#SECTid8222d20">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">



<h2><a name="SECTid8221fd8">NAME</a></h2><p class="namesection">
<b class="names">ttk::checkbutton - </b><br>On/off widget</p>
<h2><a name="SECTid8222050">SYNOPSIS</a></h2><pre class="syntax">
<b>ttk::checkbutton</b> <i class="m">pathName</i> ?<i class="m">options</i>?
</pre>
<h2><a name="SECTid8222118">DESCRIPTION</a></h2><p>A <b>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>
<h2><a name="SECTid82221b8">STANDARD OPTIONS</a></h2><div class="menu"><table class="menu" width="100%">
<tr>
<td width="25%"><a href="widget.html#stdopt_-class">-class</a></td><td width="25%"><a href="widget.html#stdopt_-compound">-compound</a></td><td width="25%"><a href="widget.html#stdopt_-cursor">-cursor</a></td><td width="25%"><a href="widget.html#stdopt_-image">-image</a></td>
</tr><tr>
<td width="25%"><a href="widget.html#stdopt_-state">-state</a></td><td width="25%"><a href="widget.html#stdopt_-style">-style</a></td><td width="25%"><a href="widget.html#stdopt_-takefocus">-takefocus</a></td><td width="25%"><a href="widget.html#stdopt_-text">-text</a></td>
</tr><tr>
<td width="25%"><a href="widget.html#stdopt_-textvariable">-textvariable</a></td><td width="25%"><a href="widget.html#stdopt_-underline">-underline</a></td><td width="25%"><a href="widget.html#stdopt_-width">-width</a></td>
</tr>
</table></div>
<h2><a name="SECTid82223e8">OPTIONS</a></h2><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="option_-command">-command</a></td><td width="40%" align="left">command</td><td width="40%" align="left">Command</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">A Tcl script to execute whenever the widget is invoked.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-offvalue">-offvalue</a></td><td width="40%" align="left">offValue</td><td width="40%" align="left">OffValue</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">The value to store in the associated <i>-variable</i> 
when the widget is deselected.  Defaults to <b>0</b>.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-onvalue">-onvalue</a></td><td width="40%" align="left">onValue</td><td width="40%" align="left">OnValue</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">The value to store in the associated <i>-variable</i> 
when the widget is selected.  Defaults to <b>1</b>.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-variable">-variable</a></td><td width="40%" align="left">variable</td><td width="40%" align="left">Variable</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">The name of a global variable whose value is linked to the widget.
Defaults to the widget pathname if not specified.
</td>
</tr>
</table></div>
<h2><a name="SECTid8222820">WIDGET COMMAND</a></h2><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>

<dt>
<i class="m">pathname</i> 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>

</dl>
<h2><a name="SECTid8222af0">WIDGET STATES</a></h2><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>
<h2><a name="SECTid8222c80">SEE ALSO</a></h2><p class="seealso">widget(n), keynav(n), <a href="radiobutton.html">radiobutton(n)</a>
</p>
<h2><a name="SECTid8222d20">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-widget">widget</a>, <a class="keyword" href="keyword-index.html#KW-button">button</a>, <a class="keyword" href="keyword-index.html#KW-toggle">toggle</a>, <a class="keyword" href="keyword-index.html#KW-check">check</a>, <a class="keyword" href="keyword-index.html#KW-option">option</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a>  <a class="navaid" href="category-index.html">Index</a>  <a class="navaid" href="keyword-index.html">Keywords</a>
</div>
</body>
</html>