3 <TITLE>iwidgets2.2.0 User Commands - pushbutton</TITLE>
5 <BODY BGCOLOR="#FFFFFF">
6 <H1>iwidgets2.2.0 User Commands - pushbutton</H1>
11 <H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
16 pushbutton - Create and manipulate a push button widget
20 <H2>SYNOPSIS</H2><PRE>
21 <STRONG>pushbutton</STRONG> <EM>pathName</EM> ?<EM>options</EM>?
25 <H2>INHERITANCE</H2><PRE>
26 itk::Widget <- pushbutton
30 <H2>STANDARD OPTIONS</H2><PRE>
31 <STRONG>activeBackground</STRONG> <STRONG>activeForegroundanchorbackground</STRONG>
32 <STRONG>bitmap</STRONG> <STRONG>borderWidth</STRONG> <STRONG>command</STRONG> <STRONG>cursor</STRONG>
33 <STRONG>disabledForeground</STRONG> <STRONG>font</STRONG> <STRONG>foregroundhighlightBackground</STRONG>
34 <STRONG>highlightColor</STRONG> <STRONG>highlightThickness</STRONG> <STRONG>imagejustify</STRONG>
35 <STRONG>padX</STRONG> <STRONG>padY</STRONG> <STRONG>state</STRONG> <STRONG>text</STRONG>
36 <STRONG>textVariable</STRONG> <STRONG>underline</STRONG> <STRONG>wrapLength</STRONG>
38 See the "options" manual entry for details on the standard
43 <H2>WIDGET-SPECIFIC OPTIONS</H2><PRE>
44 Name: <STRONG>defaultRing</STRONG>
45 Class: <STRONG>DefaultRing</STRONG>
46 Command-Line Switch: <STRONG>-defaultring</STRONG>
48 Boolean describing whether the button displays its
49 default ring given in any of the forms acceptable to
50 <STRONG>Tcl_GetBoolean</STRONG>. The default is false.
52 Name: <STRONG>defaultRingPad</STRONG>
53 Class: <STRONG>Pad</STRONG>
54 Command-Line Switch: <STRONG>-defaultringpad</STRONG>
56 Specifies the amount of space to be allocated to the
57 indentation of the default ring ring given in any of
58 the forms acceptable to <STRONG>Tcl_GetPixels</STRONG>. The option has
59 no effect if the defaultring option is set to false.
60 The default is 2 pixels.
62 Name: <STRONG>height</STRONG>
63 Class: <STRONG>Height</STRONG>
64 Command-Line Switch: <STRONG>-height</STRONG>
66 Specifies the height of the button inclusive of any
67 default ring given in any of the forms acceptable to
68 <STRONG>Tk_GetPixels</STRONG>. A value of zero lets the push button
69 determine the height based on the requested height plus
70 highlightring and defaultringpad.
73 Name: <STRONG>width</STRONG>
74 Class: <STRONG>Width</STRONG>
75 Command-Line Switch: <STRONG>-width</STRONG>
77 Specifies the width of the button inclusive of any
78 default ring given in any of the forms acceptable to
79 <STRONG>Tk_GetPixels</STRONG>. A value of zero lets the push button
80 determine the width based on the requested width plus
81 highlightring and defaultringpad.
85 <H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
90 <H2>DESCRIPTION</H2><PRE>
91 The <STRONG>pushbutton</STRONG> command creates a push button with an
92 optional default ring used for default designation and
99 The <STRONG>pushbutton</STRONG> command creates a new Tcl command whose name
100 is <EM>pathName</EM>. This command may be used to invoke various
101 operations on the widget. It has the following general
104 <EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?
106 <EM>Option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
107 mand. The following commands are possible for pushbutton
112 <H2>ASSOCIATED METHODS</H2><PRE>
113 <STRONG>flash</STRONG> <STRONG>invoke</STRONG>
115 See the "button" manual entry for details on the associated
121 <H2>WIDGET-SPECIFIC METHODS</H2><PRE>
122 <EM>pathName</EM> <STRONG>cget</STRONG> <EM>option</EM>
123 Returns the current value of the configuration option
124 given by <EM>option</EM>. <EM>Option</EM> may have any of the values
125 accepted by the <STRONG>pushbutton</STRONG> command.
127 <EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
128 Query or modify the configuration options of the
129 widget. If no <EM>option</EM> is specified, returns a list
130 describing all of the available options for <EM>pathName</EM>
131 (see <STRONG>Tk_ConfigureInfo</STRONG> for information on the format of
132 this list). If <EM>option</EM> is specified with no <EM>value</EM>, then
133 the command returns a list describing the one named
134 option (this list will be identical to the
135 corresponding sublist of the value returned if no
136 <EM>option</EM> is specified). If one or more <EM>option</EM> - <EM>value</EM>
137 pairs are specified, then the command modifies the
138 given widget option(s) to have the given value(s); in
139 this case the command returns an empty string. <EM>Option</EM>
140 may have any of the values accepted by the <STRONG>pushbutton</STRONG>
146 <H2>COMPONENTS</H2><PRE>
147 Name: <STRONG>pushbutton</STRONG>
148 Class: <STRONG>Button</STRONG>
150 The pushbutton component is the button surrounded by
151 the optional default ring. See the "button" widget
152 manual entry for details on the pushbutton component
158 <H2>EXAMPLE</H2><PRE>
159 pushbutton .pb -text "Hello" -command {puts "Hello World"} -defaultring 1
160 pack .pb -padx 10 -pady 10
172 <H2>KEYWORDS</H2><PRE>