OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [demos/] [html/] [selectionbox.n.html] - Blame information for rev 1770

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
<HTML>
2
<HEAD>
3
<TITLE>iwidgets2.2.0 User Commands - selectionbox</TITLE>
4
</HEAD>
5
<BODY BGCOLOR="#FFFFFF">
6
<H1>iwidgets2.2.0 User Commands - selectionbox</H1>
7
<HR>
8
<PRE>
9
 
10
</PRE>
11
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
12
 
13
 
14
</PRE>
15
<H2>NAME</H2><PRE>
16
     selectionbox - Create and manipulate a selection box widget
17
 
18
 
19
</PRE>
20
<H2>SYNOPSIS</H2><PRE>
21
     <STRONG>selectionbox</STRONG> <EM>pathName</EM> ?<EM>options</EM>?
22
 
23
 
24
</PRE>
25
<H2>INHERITANCE</H2><PRE>
26
     itk::Widget &lt;- selectionbox
27
 
28
 
29
</PRE>
30
<H2>STANDARD OPTIONS</H2><PRE>
31
     <STRONG>activeBackground</STRONG>               <STRONG>background</STRONG>      <STRONG>borderWidthcursor</STRONG>
32
     <STRONG>exportSelection</STRONG> <STRONG>foreground</STRONG>     <STRONG>highlightColor</STRONG>  <STRONG>highlightThickness</STRONG>
33
     <STRONG>insertBackground</STRONG>               <STRONG>insertBorderWidthinsertOffTimeinsertOnTime</STRONG>
34
     <STRONG>insertWidth</STRONG>     <STRONG>relief</STRONG>         <STRONG>repeatDelay</STRONG>     <STRONG>repeatInterval</STRONG>
35
     <STRONG>selectBackground</STRONG>               <STRONG>selectBorderWidthselectForeground</STRONG>
36
 
37
     See the "options" manual entry for details on  the  standard
38
     options.
39
 
40
 
41
</PRE>
42
<H2>ASSOCIATED OPTIONS</H2><PRE>
43
     <STRONG>textBackground</STRONG>  <STRONG>textFont</STRONG>
44
 
45
     See the "entryfield" widget class manual entry  for  details
46
     on the above associated options.
47
 
48
     <STRONG>labelFont</STRONG>       <STRONG>labelMargin</STRONG>
49
 
50
     See the "labeledwidget" class manual entry  for  details  on
51
     the above associated options.
52
 
53
     <STRONG>activeRelief</STRONG>    <STRONG>elementBorderWidth</STRONG>             <STRONG>jumptroughColor</STRONG>
54
 
55
     See the "scrollbar" widget class manual entry for details on
56
     the above associated options.
57
 
58
     <STRONG>dblClickCommand</STRONG> <STRONG>hscrollMode</STRONG>    <STRONG>items</STRONG>           <STRONG>sbWidth</STRONG>
59
     <STRONG>scrollMargin</STRONG>    <STRONG>textBackground</STRONG> <STRONG>textFont</STRONG>        <STRONG>vscrollMode</STRONG>
60
 
61
     See the "scrolledlistbox"  widget  class  manual  entry  for
62
     details on the above associated options.
63
 
64
 
65
 
66
</PRE>
67
<H2>WIDGET-SPECIFIC OPTIONS</H2><PRE>
68
     Name:           <STRONG>childSitePos</STRONG>
69
     Class:          <STRONG>Position</STRONG>
70
     Command-Line Switch:           <STRONG>-childsitepos</STRONG>
71
 
72
          Specifies the position of the child site in the  selec-
73
          tion box: <STRONG>n</STRONG>, <STRONG>s</STRONG>, <STRONG>e</STRONG>, <STRONG>w</STRONG>, or .  The default is center
74
 
75
     Name:           <STRONG>height</STRONG>
76
     Class:          <STRONG>Height</STRONG>
77
     Command-Line Switch:           <STRONG>-height</STRONG>
78
 
79
          Specifies the height of the selection box.   The  value
80
          may  be  specified  in  any  of the forms acceptable to
81
          Tk_GetPixels.  The default is 320 pixels.
82
 
83
     Name:           <STRONG>itemsCommand</STRONG>
84
     Class:          <STRONG>Command</STRONG>
85
     Command-Line Switch:           <STRONG>-itemscommand</STRONG>
86
 
87
          Specifies a command to be evaluated following selection
88
          of an item.
89
 
90
     Name:           <STRONG>itemsLabel</STRONG>
91
     Class:          <STRONG>Text</STRONG>
92
     Command-Line Switch:           <STRONG>-itemslabel</STRONG>
93
 
94
          Specifies the text of the label  for  the  items  list.
95
          The default is "List".
96
 
97
     Name:           <STRONG>itemsLabelPos</STRONG>
98
     Class:          <STRONG>Position</STRONG>
99
     Command-Line Switch:           <STRONG>-itemslabelpos</STRONG>
100
 
101
          Specifies the position of the label along the  side  of
102
          the  items  list:  <STRONG>n</STRONG>,  <STRONG>ne</STRONG>, <STRONG>e</STRONG>, <STRONG>se</STRONG>, <STRONG>s</STRONG>, <STRONG>sw</STRONG>, <STRONG>w</STRONG>, or <STRONG>nw</STRONG>.  The
103
          default is nw.
104
 
105
     Name:           <STRONG>itemsOn</STRONG>
106
     Class:          <STRONG>ItemsOn</STRONG>
107
     Command-Line Switch:           <STRONG>-itemson</STRONG>
108
 
109
          Specifies whether or not to display the items  list  in
110
          any  of  the  forms  acceptable to <STRONG>Tcl_GetBoolean</STRONG>.  The
111
          default is true.
112
 
113
     Name:           <STRONG>margin</STRONG>
114
     Class:          <STRONG>Margin</STRONG>
115
     Command-Line Switch:           <STRONG>-margin</STRONG>
116
 
117
          Specifies distance between the items list and selection
118
          entry  in  any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
119
          The default is 7 pixels.
120
 
121
     Name:           <STRONG>selectionCommand</STRONG>
122
     Class:          <STRONG>Command</STRONG>
123
     Command-Line Switch:           <STRONG>-selectioncommand</STRONG>
124
 
125
          Specifies a Tcl  procedure  to  be  associated  with  a
126
          return key press event in the selection entry field.
127
 
128
     Name:           <STRONG>selectionLabel</STRONG>
129
     Class:          <STRONG>Text</STRONG>
130
     Command-Line Switch:           <STRONG>-selectionlabel</STRONG>
131
 
132
          Specifies the text of the label for the selection entry
133
          field.  The default is "Selection".
134
 
135
     Name:           <STRONG>selectionLabelPos</STRONG>
136
     Class:          <STRONG>Position</STRONG>
137
     Command-Line Switch:           <STRONG>-selectionlabelpos</STRONG>
138
 
139
          Specifies the position of the label along the  side  of
140
          the  selection:  <STRONG>n</STRONG>,  <STRONG>ne</STRONG>,  <STRONG>e</STRONG>,  <STRONG>se</STRONG>, <STRONG>s</STRONG>, <STRONG>sw</STRONG>, <STRONG>w</STRONG>, or <STRONG>nw</STRONG>.  The
141
          default is nw.
142
 
143
     Name:           <STRONG>selectionOn</STRONG>
144
     Class:          <STRONG>SelectionOn</STRONG>
145
     Command-Line Switch:           <STRONG>-selectionon</STRONG>
146
 
147
          Specifies whether or not to display the selection entry
148
          in  any of the forms acceptable to <STRONG>Tcl_GetBoolean</STRONG>.  The
149
          default is true.
150
 
151
     Name:           <STRONG>width</STRONG>
152
     Class:          <STRONG>Width</STRONG>
153
     Command-Line Switch:           <STRONG>-width</STRONG>
154
 
155
          Specifies the width of the selection  box.   The  value
156
          may  be  specified  in  any  of the forms acceptable to
157
          Tk_GetPixels.  The default is 260 pixels.
158
 
159
 
160
</PRE>
161
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
162
 
163
 
164
 
165
</PRE>
166
<H2>DESCRIPTION</H2><PRE>
167
     The <STRONG>selectionbox</STRONG> command creates a scrolled  list  of  items
168
     and a selection entry field.  The user may choose any of the
169
     items displayed in the scrolled list of alternatives and the
170
     selection field will be filled with the choice.  The user is
171
     also free to enter a new value in the selection entry field.
172
     Both  the list and entry areas have labels.  A child site is
173
     also provided in which the user may create other widgets  to
174
     be used in conjunction with the selection box.
175
 
176
 
177
 
178
</PRE>
179
<H2>METHODS</H2><PRE>
180
     The <STRONG>selectionbox</STRONG> command creates a  new  Tcl  command  whose
181
     name  is <EM>pathName</EM>.  This command may be used to invoke vari-
182
     ous operations on the widget.  It has the following  general
183
     form:
184
 
185
          <EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?
186
 
187
     <EM>Option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
188
     mand.
189
 
190
 
191
 
192
</PRE>
193
<H2>ASSOCIATED METHODS</H2><PRE>
194
     <STRONG>curselection</STRONG>    <STRONG>delete</STRONG>         <STRONG>index</STRONG>           <STRONG>nearest</STRONG>
195
     <STRONG>scan</STRONG>            <STRONG>selection</STRONG>      <STRONG>size</STRONG>
196
 
197
     See the "listbox" widget class manual entry for  details  on
198
     the associated methods.
199
 
200
 
201
 
202
</PRE>
203
<H2>WIDGET-SPECIFIC METHODS</H2><PRE>
204
     <EM>pathName</EM> <STRONG>cget</STRONG> <EM>option</EM>
205
          Returns the current value of the  configuration  option
206
          given  by  <EM>option</EM>.   <EM>Option</EM>  may have any of the values
207
          accepted by the <STRONG>selectionbox</STRONG> command.
208
 
209
     <EM>pathName</EM> <STRONG>childsite</STRONG>
210
          Returns the child site widget path name.
211
 
212
     <EM>pathName</EM> <STRONG>clear</STRONG> <EM>component</EM>
213
          Delete the  contents  of  either  the  selection  entry
214
          widget  or  items  list.  The <EM>component</EM> argument may be
215
          either <STRONG>items</STRONG> or <STRONG>selection</STRONG>.
216
 
217
     <EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
218
          Query  or  modify  the  configuration  options  of  the
219
          widget.   If  no  <EM>option</EM>  is  specified, returns a list
220
          describing all of the available  options  for  <EM>pathName</EM>
221
          (see  <STRONG>Tk_ConfigureInfo</STRONG> for information on the format of
222
          this list).  If <EM>option</EM> is specified with no <EM>value</EM>, then
223
          the  command  returns  a  list describing the one named
224
          option (this list will be identical to the  correspond-
225
          ing  sublist  of  the  value  returned  if no <EM>option</EM> is
226
          specified).  If one or more  <EM>option</EM> - <EM>value</EM>  pairs  are
227
          specified,  then  the command modifies the given widget
228
          option(s) to have the given value(s);  in this case the
229
          command  returns  an empty string.  <EM>Option</EM> may have any
230
          of the values accepted by the <STRONG>selectionbox</STRONG> command.
231
 
232
     <EM>pathName</EM> <STRONG>get</STRONG>
233
          Returns  the  current  value  of  the  selection  entry
234
          widget.
235
 
236
     <EM>pathName</EM> <STRONG>insert</STRONG> <EM>component</EM> <EM>args</EM>
237
          Insert  element(s)  into  either  the  selection  entry
238
          widget  or  items  list.  The <EM>component</EM> argument may be
239
          either <STRONG>items</STRONG> or <STRONG>selection</STRONG>.  The <EM>args</EM> follow  the  rules
240
          of either an entry or list widget depending on the <EM>com-</EM>
241
          <EM>ponent</EM> value.
242
 
243
     <EM>pathName</EM> <STRONG>selectitem</STRONG>
244
          Replace the selection entry  field  contents  with  the
245
          currently selected items value.
246
 
247
 
248
 
249
</PRE>
250
<H2>COMPONENTS</H2><PRE>
251
     Name:           <STRONG>childsite</STRONG>
252
     Class:          <STRONG>Frame</STRONG>
253
 
254
          The childsite component is the user child site for  the
255
          selection box.  See the "frame" widget manual entry for
256
          details on the childsite component item.
257
 
258
     Name:           <STRONG>items</STRONG>
259
     Class:          <STRONG>Scrolledlistbox</STRONG>
260
 
261
          The items component provides the scrolled list  box  of
262
          items for the selection box.  See the "scrolledlistbox"
263
          widget manual entry for details on the items  component
264
          item.
265
 
266
     Name:           <STRONG>selection</STRONG>
267
     Class:          <STRONG>Entryfield</STRONG>
268
 
269
          The selection component provides the entry field in the
270
          selection  box  for display of the selected item in the
271
          items component.  See the  "entryfield"  widget  manual
272
          entry for details on the selection component item.
273
 
274
 
275
 
276
</PRE>
277
<H2>EXAMPLE</H2><PRE>
278
           option add *textBackground white
279
 
280
           selectionbox .sb -items {Hello {Out There} World}
281
           pack .sb -padx 10 -pady 10 -fill both -expand yes
282
 
283
           set cs [label [.sb childsite].label -text "Child Site"]
284
           pack $cs -fill x -padx 10 -pady 10
285
 
286
           .sb insert items 2 {Cruel Cruel}
287
 
288
           .sb selection set 1
289
 
290
 
291
 
292
</PRE>
293
<H2>AUTHOR</H2><PRE>
294
     Mark L. Ulferts
295
 
296
 
297
</PRE>
298
<H2>KEYWORDS</H2><PRE>
299
     selectionbox, widget
300
 
301
 
302
 
303
</PRE>
304
</BODY>
305
</HTML>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.