projman/hlp/en/bwidget/ButtonBox.html
2015-10-19 14:27:31 +04:00

221 lines
6.5 KiB
HTML

<HTML>
<HEAD><TITLE>ButtonBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ButtonBox</B>
- Set of buttons with horizontal or vertical layout
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ButtonBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-orient">-orient</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-pady">-pady</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-spacing">-spacing</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ButtonBox layouts Button horizontally or vertically.
Some commands take an <I>index</I> as argument indicating on which
Button it work. This index may be specified in any of the following forms:
<P>
<DL COMPACT>
<DT>
<I>number</I>
<DD>
Specifies the Button numerically, where 0 corresponds
to the first added Button, 1 to the next, and so on.
<DT>
<B>end</B> or <B>last</B>
<DD>
Indicates the last item added.
<DT><B>default</B>
<DD>
Indicates the default Button.
</DL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-background"><B>-background</B></A></DT>
<DD>
Specifies a default background color for all added buttons and for the frame.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>
Specifies the default button of the button box. The value is an integer
referencing the n-th added button, starting from 0.
If this value is -1 (the default), all button wil be drawn with their -default
option set to disabled, and this value can not be changed. <BR>If this value is
not -1, the associated button is drawn with -default option set to active and
the others are drawn with -default option set to normal. The value can be changed
by configure.
</DD>
</DL>
<DL><DT><A NAME="-homogeneous"><B>-homogeneous (read-only)</B></A></DT>
<DD>
Specifies wether or not buttons must have the same width for horizontal layout.
</DD>
</DL>
<DL><DT><A NAME="-orient"><B>-orient (read-only)</B></A></DT>
<DD>
Specifies the orientation of the button box. If this option is <B>horizontal</B>
(the default), buttons are added from top to bottom.
If this option is <B>vertical</B>, buttons are added from left to right.
</DD>
</DL>
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
<DD>
Specifies a default value for the -padx option of all added buttons.
</DD>
</DL>
<DL><DT><A NAME="-pady"><B>-pady</B></A></DT>
<DD>
Specifies a default value for the -pady option of all added buttons.
</DD>
</DL>
<DL><DT><A NAME="-spacing"><B>-spacing</B></A></DT>
<DD>
Specifies the default spacing between buttons. This value can be changed before each
call to <B>add</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
?<I>option value...</I>?
</DT><DD>
Add a button to the button box.
<P>
See <A HREF="Button.html"><B>Button</B></A> for description of options.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>index</I>
</DT><DD>
Return the numerical index corresponding to the item.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
<I>index</I>
</DT><DD>
Invoke the Button given by <I>index</I>.
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
<I>index</I>
</DT><DD>
Set the focus to the Button given by <I>index</I>.
</DD></DL>
</BODY></HTML>