summaryrefslogtreecommitdiff
path: root/iwidgets/demos/html/extbutton.n.html
blob: 99cc59652c7272d621085333f488860d114eec21 (plain)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<TITLE>extbutton - Extends the behavior of the Tk button</TITLE>
<H1>extbutton - Extends the behavior of the Tk button</H1>

</pre><H2>SYNOPSIS</H2>
<B>extbutton <I>pathName </I>?<I>options</I>?
</pre><H2>INHERITANCE</H2>
<I>itk::Widget &lt;- extbutton</I>
</pre><H2>STANDARD OPTIONS</H2>
<P><I>
<table cellpadding=5>
<td valign=top>
<B>activebackground</B><br>
<B>bd</B><br>
<B>foreground</B><br>
<B>text</B><br>
</td>
<td valign=top>
<B>activeforeground</B><br>
<B>cursor</B><br>
<B>image</B><br>
</td>
<td valign=top>
<B>bitmap</B><br>
<B>disabledforeground</B><br>
<B>justify</B><br>
</td>
<td valign=top>
<B>background</B><br>
<B>font</B><br>
<B>relief</B><br>
</td>
</table>
</I>
<P>
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/options.n.html"> "options" </A> manual entry for details on the standard options.
</pre><H2>WIDGET-SPECIFIC OPTIONS</H2>
<P>
<pre>
Name:                   <B>bitmapforeground</B>
Class:                  <B>Foreground</B>
Command-Line Switch:	<B>-bitmapforeground</B>
</pre>
<UL>
Configures the foreground color of the bitmap.
</UL>
<P>
<pre>
Name:                   <B>command</B>
Class:                  <B>Command</B>
Command-Line Switch:	<B>-command</B>
</pre>
<UL>
Associate a command with the extbutton. Simulates a Tk button's
-command option. Invoked by either &lt;1&gt; events or by explicitly
calling the public invoke() method.
</UL>
<P>
<pre>
Name:                   <B>defaultring</B>
Class:                  <B>DefaultRing</B>
Command-Line Switch:    <B>-defaultring</B>
</pre>
<UL>
Boolean describing whether the extbutton displays its default ring given in
any of the forms acceptable to <B>Tcl_GetBoolean</B>.  The default is false.
</UL>
<P>
<pre>
Name:                   <B>defaultringpad</B>
Class:                  <B>Pad</B>
Command-Line Switch:    <B>-defaultringpad</B>
</pre>
<UL>
Specifies the amount of space to be allocated to the indentation of the
default ring ring given in any of the forms acceptable to <B>Tcl_GetPixels</B>.
The option has no effect if the defaultring option is set to false.  The
default is 4 pixels.
</UL>
<P>
<pre>
Name:                   <B>imagePos</B>
Class:                  <B>Position</B>
Command-Line Switch:    <B>-imagepos</B>
</pre>
<UL>
Specifies the image position relative to the message text: <B>n</B>, <B>ne</B>,
<B>nw</B>, <B>s</B>, <B>se</B>, <B>sw</B>, <B>w</B>, <B>wn</B>, <B>ws</B>, <B>e</B>,
<B>en</B>, or <B>es</B>. The default is w.
</UL>
<P>
<pre>
Name:                   <B>ringBackground</B>
Class:                  <B>Background</B>
Command-Line Switch:	<B>-ringbackground</B>
</pre>
<UL>
Configures the background color of the default ring frame (if -defaultring
is set to boolean true).
</UL>
<P>
</pre><HR>

</pre><H2>DESCRIPTION</H2>
<P>
The <B>extbutton</B> extends the behavior of the atomic Tk button by
allowing text and an image or bitmap to coexist. The user may use
the -image or -bitmap options to specify an image as well as the
-imagepos option to specify image position relative to the text.
Note that the extbutton is not intended to be used without an
image/bitmap. There will be an emtpy space next to the text if
no image/bitmap is specified.

</pre><H2>METHODS</H2>
<P>
The <B>extbutton</B> command creates a new Tcl command whose
name is <I>pathName</I>.  This command may be used to invoke various
operations on the widget.  It has the following general form:
<pre>
<I>pathName option </I>?<I>arg arg ...</I>?
</pre>

</pre><H2>INHERITED METHODS</H2>
Each of the following methods are inherited from itk::Archetype. See that
man page for details.
<pre>
<I>pathName <B>cget</B>
pathName <B>component</B>
pathName <B>config</B>
pathName <B>configure</B></I>
</pre>

</pre><H2>WIDGET-SPECIFIC METHODS</H2>
<DL>
<DT> <I><B>pathName invoke
</I></B>
<DD> Evaluates the command fragment associated with the -command option.
</DL>
<DL>
<DT> <I><B>pathName flash
</I></B>
<DD> Simulates the Tk button's flash command.
</DL>
</pre><H2>EXAMPLES</H2>
<pre>
</B>
iwidgets::extbutton .eb -text "Bitmap example" -bitmap info \
  -background bisque -activeforeground red -bitmapforeground blue \
  -defaultring 1 -command {puts "Bisque is beautiful"}
pack .eb -expand 1

iwidgets::extbutton .eb -text "Image example" -relief ridge -image \
  [image create photo -file $itk::library/../iwidgets/demos/images/clear.gif] \
  -font 9x15bold -background lightgreen -imagepos e \
  -activebackground lightyellow
pack .eb -expand 1

</pre><H2>AUTHOR</H2>
Chad Smith
</pre><H2>KEYWORDS</H2>
button, pushbutton