OSDN Git Service

Enable to track git://github.com/monaka/binutils.git
[pf3gnuchains/pf3gnuchains3x.git] / itcl / iwidgets / demos / html / labeledframe.n.html
1 <TITLE>labeledframe - Create and manipulate a labeled frame widget</TITLE>
2 <H1>labeledframe - Create and manipulate a labeled frame widget</H1>
3
4 </pre><H2>SYNOPSIS</H2>
5 <B>labeledframe<I> <I>pathName </I>?<I>options</I>?
6 </pre><H2>INHERITANCE</H2>
7 itk::Archetype &lt;- labeledframe
8 </pre><H2>STANDARD OPTIONS</H2>
9 <P>
10 <table cellpadding=5>
11 <td valign=top>
12 <B>background</B><br>
13 <B>relief</B><br>
14 </td>
15 <td valign=top>
16 <B>borderwidth</B><br>
17 </td>
18 <td valign=top>
19 <B>cursor</B><br>
20 </td>
21 <td valign=top>
22 <B>foreground</B><br>
23 </td>
24 </table>
25 <P>
26 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.
27 </pre><H2>WIDGET-SPECIFIC OPTIONS</H2>
28 <P>
29 <pre>
30 Name:                   <B>iPadX</B>
31 Class:                  <B>IPad</B>
32 Command-Line Switch:    <B>-ipadx</B>
33 </pre>
34 <UL>
35 Specifies horizontal padding space between the border and the childsite.
36 The value may have any of the forms acceptable to <B>Tk_GetPixels</B>.
37 The default is 0.
38 </UL>
39 <P>
40 <pre>
41 Name:                   <B>iPadY</B>
42 Class:                  <B>IPad</B>
43 Command-Line Switch:    <B>-ipady</B>
44 </pre>
45 <UL>
46 Specifies vertical padding space between the border and the childsite.
47 The value may have any of the forms acceptable to <B>Tk_GetPixels</B>.
48 The default is 0.
49 </UL>
50 <P>
51 <pre>
52 Name:                   <B>labelBitmap</B>
53 Class:                  <B>Bitmap</B>
54 Command-Line Switch:    <B>-labelbitmap</B>
55 </pre>
56 <UL>
57 Specifies a bitmap to display in the label, in any of the forms 
58 acceptable to <B>Tk_GetBitmap</B>.  This option overrides the <I>labeltext</I>
59 option.
60 </UL>
61 <P>
62 <pre>
63 Name:                   <B>labelImage</B>
64 Class:                  <B>Image</B>
65 Command-Line Switch:    <B>-labelimage</B>
66 </pre>
67 <UL>
68 Specifies a image to be used as the label. The image may be any of the
69 values created by the <B>image create</B> command.  This option overrides
70 both the <I>labelbitmap</I> and <I>labeletext</I> options.
71 </UL>
72 <P>
73 <pre>
74 Name:                   <B>labelMargin</B>
75 Class:                  <B>Margin</B>
76 Command-Line Switch:    <B>-labelmargin</B>
77 </pre>
78 <UL>
79 Specifies the distance between the inner ede of the hull frames relief,
80 and the label in any of the forms acceptable to <B>Tk_GetPixels</B>. 
81 The default is 10 pixels.
82 </UL>
83 <P>
84 <pre>
85 Name:                   <B>labelText</B>
86 Class:                  <B>Text</B>
87 Command-Line Switch:    <B>-labeltext</B>
88 </pre>
89 <UL>
90 Specifies the text of the label around the childsite.
91 </UL>
92 <P>
93 <pre>
94 Name:                   <B>labelVariable</B>
95 Class:                  <B>Variable</B>
96 Command-Line Switch:    <B>-labelvariable</B>
97 </pre>
98 <UL>
99 Specifies the text variable of the label around the childsite.
100 </UL>
101 <P>
102 <pre>
103 Name:                   <B>labelFont</B>
104 Class:                  <B>Font</B>
105 Command-Line Switch:    <B>-labelfont</B>
106 </pre>
107 <UL>
108 Specifies the font of the label around the childsite.
109 </UL>
110 <P>
111 <pre>
112 Name:                   <B>labelPos</B>
113 Class:                  <B>Position</B>
114 Command-Line Switch:    <B>-labelpos</B>
115 </pre>
116 <UL>
117 Specifies the position of the label within the grooved relief of the hull widget.
118 <B> ne, n, nw, se, s, sw, en, e, es, wn, w, ws</B>  Default is <B>n</B>.
119 </UL>
120 <P>
121 </pre><HR>
122
123 </pre><H2>DESCRIPTION</H2>
124 <P>
125 The <B>labeledframe</B> command creates a hull frame with a
126 grooved relief, a label positioned within the grooved relief of
127 the hull frame, and a frame childsite.  The frame childsite can filled with any
128 widget via a derived class or though the use of the childsite method.
129 This class was designed to be a general purpose base class for supporting the 
130 combination of labeled frame and a childsite.  The options include the
131 ability to position the label at configurable locations within the
132 grooved relief of the hull frame, and control the display of the label.
133 </pre><H2>METHODS</H2>
134 <P>
135 The <B>labeledframe</B> command creates a new Tcl command whose
136 name is <I>pathName</I>.  This
137 command may be used to invoke various
138 operations on the widget.  It has the following general form:
139 <pre>
140 <I>pathName option </I>?<I>arg arg ...</I>?
141 </pre>
142 <I>Option</I> and the <I>arg</I>s
143 determine the exact behavior of the command.  The following
144 commands are possible for labeledframe widgets:
145 </pre><H2>WIDGET-SPECIFIC METHODS</H2>
146 <DL>
147 <DT> <I>pathName <B>childsite</B>
148 </I></B>
149 <DD> Return the path name of the child site.
150 </DL>
151 <DL>
152 <DT> <I>pathName <B>cget</B> <I>option</I>
153 </I></B>
154 <DD> Returns the current value of the configuration option given
155 by <I>option</I>.
156 <I>Option</I> may have any of the values accepted by the <B>labeledframe</B>
157 command.
158 </DL>
159 <DL>
160 <DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?
161 </I></B>
162 <DD> Query or modify the configuration options of the widget.
163 If no <I>option</I> is specified, returns a list describing all of
164 the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for
165 information on the format of this list).  If <I>option</I> is specified
166 with no <I>value</I>, then the command returns a list describing the
167 one named option (this list will be identical to the corresponding
168 sublist of the value returned if no <I>option</I> is specified).  If
169 one or more <I>option-value</I> pairs are specified, then the command
170 modifies the given widget option(s) to have the given value(s);  in
171 this case the command returns an empty string.
172 <I>Option</I> may have any of the values accepted by the <B>labeledframe</B>
173 command.
174
175 </DL>
176 </pre><H2>COMPONENTS</H2>
177 <P>
178 <pre>
179 Name:                   <B>label</B>
180 Class:                  <B>label</B>
181 </pre>
182 <UL>
183 The label component provides the label for the labeled widget.  See the 
184 "label" widget manual entry for details on the label component item.
185 </UL>
186 </table>
187 <P>
188
189 </pre><H2>EXAMPLE</H2>
190 <UL>
191 The labeledframe was primarily meant to be a base class.  The
192 Radiobox is a good example of a derived classe of the labeledframe class.
193 In order to provide equal support for composite classes, the 'childsite' methods
194 also exists.  The following is an example of 'childsite' method usage.
195 </UL>
196 <P>
197 <pre>
198  labeledframe .lw -labeltext "Entry Frame" -labelpos n
199  pack .lw -fill both -expand yes -padx 10 -pady 10
200  set cs [.lw childsite]
201
202  pack [Entryfield $cs.entry1 -labeltext "Name:"] -side top -fill x
203  pack [Spinint $cs.entry2 -labeltext "Number:"] -side top -fill x
204  pack [Pushbutton $cs.entry3 -text "Details:"] -side top -fill x
205
206 </pre>
207 </pre><H2>AUTHOR</H2>
208 John A. Tucker
209 </pre><H2>KEYWORDS</H2>
210 labeledframe, widget