You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
161 lines
4.4 KiB
HTML
161 lines
4.4 KiB
HTML
15 years ago
|
<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 <- 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 <1> 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
|