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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [TList.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
 
2
 
3
 
4
<TITLE>tixTList - Create and manipulate Tix Tabular List widgets</TITLE>
5
<Center><H2>tixTList - Create and manipulate Tix Tabular List widgets</H2></Center><hr>
6
 
7
</pre><H3>SYNOPSIS</H3>
8
<B>tixTList<I> <I>pathName ?<I>options</I></B>?
9
<P>
10
</pre><H3>SUPER-CLASS</H3>
11
None.
12
</pre><H3>STANDARD OPTIONS</H3>
13
<P>
14
<pre><code><code><code>
15
<B>background</B></I>   <B>borderWidth</B></I>  <B>cursor</B></I>       <B>foreground</B></I>
16
<B>font</B></I> <B>height</B></I>       <B>highlightColor <B>highlightThickness
17
<B>relief</B></I>       <B>selectBackground</B></I>     <B>selectForeground</B></I>
18
<B>xScrollCommand</B></I>       <B>yScrollCommand</B></I>       <B>width</B></I>
19
</code></code></code></pre>
20
<P>
21
See the <B>options(n)</B></I> manual entry for details on the standard options.
22
</pre><H3>WIDGET-SPECIFIC OPTIONS</H3>
23
<P>
24
<pre><code><code><code>
25
Name:           <B>browsecmd</B></I>
26
Class:          <B>BrowseCmd</B></I>
27
Switch:         <B>-browsecmd</B></I>
28
</code></code></code></pre>
29
<UL>
30
Specifies a TCL command to be executed when the user browses through the
31
entries in the TList widget.
32
</UL>
33
<P>
34
<pre><code><code><code>
35
Name:           <B>command</B></I>
36
Class:          <B>Command</B></I>
37
Switch:         <B>-command</B></I>
38
</code></code></code></pre>
39
<UL>
40
Specifies the TCL command to be executed when the user invokes a list
41
entry in the TList widget. Normally the user invokes a list
42
entry by double-clicking it or pressing the Return key.
43
</UL>
44
<P>
45
<pre><code><code><code>
46
Name:           <B>foreground</B></I>
47
Class:          <B>Foreground</B></I>
48
Switch:         <B>-foreground</B></I>
49
Alias:          <B>-fg</B></I>
50
</code></code></code></pre>
51
<UL>
52
Specifies the default foreground color for the list entries.
53
</UL>
54
<P>
55
<pre><code><code><code>
56
Name:           <B>height</B></I>
57
Class:          <B>Height</B></I>
58
Switch:         <B>-height</B></I>
59
</code></code></code></pre>
60
<UL>
61
Specifies the desired height for the window in number of characters.
62
</UL>
63
<P>
64
<pre><code><code><code>
65
Name:           <B>itemType</B></I>
66
Class:          <B>ItemType</B></I>
67
Switch:         <B>-itemtype</B></I>
68
</code></code></code></pre>
69
<UL>
70
Specifies the default type of display item for this TList widget. When
71
you call the <B>insert</B></I> widget commands, display items of this
72
type will be created if the <B>-itemtype</B></I> option is not specified .
73
</UL>
74
<P>
75
<pre><code><code><code>
76
Name:           <B>orient</B></I>
77
Class:          <B>Orient</B></I>
78
Switch:         <B>-orient</B></I>
79
</code></code></code></pre>
80
<UL>
81
Specifies the order of tabularizing the list entries. When set to
82
"<B>vertical</B></I>", the entries are arranged in a column, from top to
83
bottom. If the entries cannot be contained in one column, the
84
remaining entries will go to the next column, and so on. When set to
85
"<B>horizontal</B></I>", the entries are arranged in a row, from left to
86
right. If the entries cannot be contained in one row, the remaining
87
entries will go to the next row, and so on.
88
</UL>
89
<P>
90
<pre><code><code><code>
91
Name:           <B>padX</B></I>
92
Class:          <B>Pad</B></I>
93
Switch:         <B>-padx</B></I>
94
</code></code></code></pre>
95
<UL>
96
The default horizontal padding for list entries.
97
</UL>
98
<P>
99
<pre><code><code><code>
100
Name:           <B>padY</B></I>
101
Class:          <B>Pad</B></I>
102
Switch:         <B>-padx</B></I>
103
</code></code></code></pre>
104
<UL>
105
The default vertical padding for list entries.
106
</UL>
107
<P>
108
<pre><code><code><code>
109
Name:           <B>selectBackground</B></I>
110
Class:          <B>SelectBackground</B></I>
111
Switch:         <B>-selectbackground</B></I>
112
</code></code></code></pre>
113
<UL>
114
Specifies the background color for the selected list entries.
115
</UL>
116
<P>
117
<pre><code><code><code>
118
Name:           <B>selectBorderWidth</B></I>
119
Class:          <B>BorderWidth</B></I>
120
Switch:         <B>-selectborderwidth</B></I>
121
</code></code></code></pre>
122
<UL>
123
Specifies a non-negative value indicating the width of the 3-D border
124
to draw around selected items.  The value may have any of the forms
125
acceptable to <B>Tk_GetPixels</B></I>.
126
</UL>
127
<P>
128
<pre><code><code><code>
129
Name:           <B>selectForeground</B></I>
130
Class:          <B>SelectForeground</B></I>
131
Switch:         <B>-selectforeground</B></I>
132
</code></code></code></pre>
133
<UL>
134
Specifies the foreground color for the selected list entries.
135
</UL>
136
<P>
137
<pre><code><code><code>
138
Name:           <B>selectMode</B></I>
139
Class:          <B>SelectMode</B></I>
140
Switch:         <B>-selectmode</B></I>
141
</code></code></code></pre>
142
<UL>
143
Specifies one of several styles for manipulating the selection.  The
144
value of the option may be arbitrary, but the default bindings expect
145
it to be either <B>single</B></I>, <B>browse</B></I>, <B>multiple</B></I>, or
146
<B>extended</B></I>; the default value is <B>single</B></I>.
147
</UL>
148
<P>
149
<pre><code><code><code>
150
Name:           <B>sizeCmd</B></I>
151
Class:          <B>SizeCmd</B></I>
152
Switch:         <B>-sizecmd</B></I>
153
</code></code></code></pre>
154
<UL>
155
Specifies a TCL script to be called whenever the TList widget
156
changes its size. This command can be useful to implement "user scroll
157
bars when needed" features.
158
</UL>
159
<P>
160
<pre><code><code><code>
161
Name:           <B>state</B></I>
162
Class:          <B>State</B></I>
163
Switch:         <B>-state</B></I>
164
</code></code></code></pre>
165
<UL>
166
Specifies whether the TList command should react to user actions. When
167
set to "<B>normal</B></I>", the TList reacts to user actions in the normal
168
way. When set to "<B>disabled</B></I>", the TList can only be scrolled, but
169
its entries cannot be selected or activated.
170
</UL>
171
<P>
172
<pre><code><code><code>
173
Name:           <B>width</B></I>
174
Class:          <B>Width</B></I>
175
Switch:         <B>-width</B></I>
176
</code></code></code></pre>
177
<UL>
178
Specifies the desired width for the window in characters.
179
</UL>
180
</pre><HR>
181
</pre><H3>DESCRIPTION</H3>
182
<P>
183
The <B>tixTList</B></I> command creates a new window (given by the
184
<I>pathName</I></B> argument) and makes it into a TList widget.
185
Additional options, described above, may be specified on the command
186
line or in the option database to configure aspects of the
187
TList widget such as its cursor and relief.
188
<P>
189
The TList widget can be used to display data in a tabular format. The
190
list entries of a TList widget are similar to the entries in the Tk
191
listbox widget. The main differences are (1) the TList widget can
192
display the list entries in a two dimensional format and (2) you can
193
use graphical images as well as multiple colors and fonts for
194
the list entries.
195
<P>
196
Each list entry is identified by an <B>index</B></I>, which can be in the
197
following forms:
198
<UL>
199
<DL>
200
<DT> <I>number</I></B>
201
</I></B>
202
<DD> An integer that indicates the position of the entry in the list. 0
203
means the first position, 1 means the second position, and so on.
204
</DL>
205
<DL>
206
<DT> <B>end</B></I>
207
</I></B>
208
<DD> Indicates the end of the listbox. For some commands this means just
209
after the last entry; for other commands it means the last entry.
210
</DL>
211
<DL>
212
<DT> <B>@</B></I><I>x</I></B>,<I>y</I></B>
213
</I></B>
214
<DD> Indicates the element that covers the point in the listbox window
215
specified by x and y (in pixel coordinates). If no element covers that
216
point, then the closest element to that point is used.
217
</DL>
218
</UL>
219
</pre><H3>DISPLAY ITEMS</H3>
220
<P>
221
Each list entry in an TList widget is associated with a <B>display
222
item</B></I>.  The display item determines what visual information should
223
be displayed for this list entry. Please see the <B>DItem(n)</B></I> manual
224
page for a list of all display items.
225
<P>
226
When a list entry is created by the <B>insert</B></I> command, the type of
227
its display item is determined by the <B>-itemtype</B></I> option passed
228
to these commands. If the <B>-itemtype</B></I> is omitted, then by default
229
used.
230
</pre><H3>WIDGET COMMAND</H3>
231
<P>
232
The <B>tixTList</B></I> command creates a new Tcl command whose name is the
233
may be used to invoke various operations on the widget.  It has the
234
following general form:
235
<pre>
236
<I>pathName option </I></B>?<I>arg arg ...</I></B>?
237
<P>
238
</pre>
239
<I>PathName</I></B> is the name of the command, which is the same as
240
determine the exact behavior of the command.  The following
241
commands are possible for TList widgets:
242
<DL>
243
<DT> <I>pathName <B>anchor set <I>index</I></B>
244
</I></B>
245
<DD> Sets the anchor to the list entry identified by <I>index</I></B>. The
246
anchor is the end of the selection that is fixed while dragging out a
247
selection with the mouse.
248
</DL>
249
<DL>
250
<DT> <I>pathName <B>anchor clear</B></I>
251
</I></B>
252
<DD> Removes the anchor, if any, from this TList widget. This only removes
253
the surrounding highlights of the anchor entry and does not affect its
254
selection status.
255
</DL>
256
<DL>
257
<DT> <I>pathName <B>cget</B></I> <I>option</I></B>
258
</I></B>
259
<DD> Returns the current value of the configuration option given by
260
<I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the
261
<B>tixTList</B></I> command.
262
</DL>
263
<DL>
264
<DT> <I>pathName <B>configure</B></I> ?<I>option</I></B>? <I>?value option value ...</I></B>?
265
</I></B>
266
<DD> Query or modify the configuration options of the widget.  If no
267
<I>option</I></B> is specified, returns a list describing all of the
268
available options for <I>pathName</I></B> (see <B>Tk_ConfigureInfo</B></I> for
269
information on the format of this list). If <I>option</I></B> is specified
270
with no <I>value</I></B>, then the command returns a list describing the
271
one named option (this list will be identical to the corresponding
272
sublist of the value returned if no <I>option</I></B> is specified).  If
273
one or more <I>option-value</I></B> pairs are specified, then the command
274
modifies the given widget option(s) to have the given value(s); in
275
this case the command returns an empty string.  <I>Option</I></B> may have
276
any of the values accepted by the <B>tixTList</B></I> command.
277
</DL>
278
<DL>
279
<DT> <I>pathName <B>delete</B></I> <I>from</I></B> ?<I>to</I></B>?
280
</I></B>
281
<DD> Deletes one or more list entries between the two entries specified by
282
the indices <I>from</I></B> and <I>to</I></B>. If <I>to</I></B> is not specified, deletes
283
the single entry specified by <I>from</I></B>.
284
</DL>
285
<DL>
286
<DT> <I>pathName <B>dragsite set <I>index</I></B>
287
</I></B>
288
<DD> Sets the dragsite to the list entry identified by
289
<I>index</I></B>. The dragsite is used to indicate the source of a
290
drag-and-drop action. Currently drag-and-drop functionality has not
291
been implemented in Tix yet.
292
</DL>
293
<DL>
294
<DT> <I>pathName <B>dragsite clear</B></I>
295
</I></B>
296
<DD> Remove the dragsite, if any, from the this TList widget. This only
297
removes the surrounding highlights of the dragsite entry and does not
298
affect its selection status.
299
</DL>
300
<DL>
301
<DT> <I>pathName <B>dropsite set <I>index</I></B>
302
</I></B>
303
<DD> Sets the dropsite to the list entry identified by <I>index</I></B>. The
304
dropsite is used to indicate the target of a grag-and-drop
305
action. Currently drag-and-drop functionality has not been implemented
306
in Tix yet.
307
</DL>
308
<DL>
309
<DT> <I>pathName <B>dropsite clear</B></I>
310
</I></B>
311
<DD> Remove the dropsite, if any, from the this TList widget. This only
312
removes the surrounding highlights of the dropsite entry and does not
313
affect its selection status.
314
</DL>
315
<DL>
316
<DT> <I>pathName <B>entrycget</B></I> <I>index option</I></B>
317
</I></B>
318
<DD> Returns the current value of the configuration option given by
319
<I>option</I></B> for the entry indentfied by <I>index</I></B>. <I>Option</I></B> may
320
have any of the values accepted by the <B>insert</B></I> widget command.
321
</DL>
322
<DL>
323
<DT> <I>pathName <B>entryconfigure<I> index </I></B>?<I>option</I></B>? <I>?value option value ...</I></B>?
324
</I></B>
325
<DD> Query or modify the configuration options of the list entry indentfied
326
by <I>index</I></B>. If no <I>option</I></B> is specified, returns a list
327
describing all of the available options for <I>index</I></B> (see
328
<B>Tk_ConfigureInfo</B></I> for information on the format of this list). If
329
<I>option</I></B> is specified with no <I>value</I></B>, then the command
330
returns a list describing the one named option (this list will be
331
identical to the corresponding sublist of the value returned if no
332
<I>option</I></B> is specified). If one or more <I>option-value</I></B> pairs
333
are specified, then the command modifies the given option(s) to have
334
the given value(s); in this case the command returns an empty string.
335
<I>Option</I></B> may have any of the values accepted by the <B>insert</B></I>
336
widget command. The exact set of options depends on the
337
value of the <B>-itemtype</B></I> option passed to the the <B>insert</B></I>
338
widget command when this list entry is created.
339
</DL>
340
<DL>
341
<DT> <I>pathName <B>insert<I> index </I></B>?<I>option value ...</I></B>?
342
</I></B>
343
<DD> Creates a new list entry at the position indicated by <I>index</I></B>. The
344
following configuration options can be given to configure the list
345
entry:
346
</DL>
347
<UL>
348
<DL>
349
<DT> <B>-itemtype<I> type</I></B>
350
</I></B>
351
<DD> Specifies the type of display item to be display for the new list
352
entry. <I>type</I></B> must be a valid display item type. Currently the
353
available display item types are <B>image</B></I>, <B>imagetext</B></I>,
354
<B>text</B></I>, and <B>window</B></I>. If this option is not specified, then by
355
option is used.
356
</DL>
357
<DL>
358
<DT> <B>-state</B></I>
359
</I></B>
360
<DD> Specifies whether this entry can be selected or invoked by the user.
361
Must be either <B>normal</B></I> or <B>disabled</B></I>.
362
</DL>
363
</UL>
364
The <B>insert</B></I> widget command accepts additional configuration options
365
to configure the display item associated with this list entry. The set
366
of additional configuration options depends on the type of the display
367
item given by the <B>-itemtype</B></I> option. Please see the
368
<B>DItem(n)</B></I> manual page for a list of the configuration options for
369
each of the display item types.
370
<DL>
371
<DT> <I>pathName <B>info <I>option</I></B> <I>arg ...</I></B>
372
</I></B>
373
<DD> Query information about the TList widget. <I>option</I></B> can be one
374
of the following:
375
</DL>
376
<UL>
377
<DL>
378
<DT> <I>pathName <B>info <B>anchor</B></I> <I>index</I></B>
379
</I></B>
380
<DD> ;
381
Returns the index of the current anchor, if any, of the TList
382
widget. If the anchor is not set, returns the empty string.
383
</DL>
384
<DL>
385
<DT> <I>pathName <B>info <B>dragsite</B></I> <I>index</I></B>
386
</I></B>
387
<DD> Returns the index of the current dragsite, if any, of the TList
388
widget. If the dragsite is not set, returns the empty string.
389
</DL>
390
<DL>
391
<DT> <I>pathName <B>info <B>dropsite</B></I> <I>index</I></B>
392
</I></B>
393
<DD> Returns the index of the current dropsite, if any, of the TList
394
widget. If the dropsite is not set, returns the empty string.
395
</DL>
396
<DL>
397
<DT> <I>pathName <B>info <B>selection</B></I>
398
</I></B>
399
<DD> Returns a list of selected elements in the TList widget. If no entries
400
are selectd, returns an empty string.
401
</DL>
402
</UL>
403
<DL>
404
<DT> <I>pathName <B>nearest <I>x y</I></B>
405
</I></B>
406
<DD> Given an (x,y) coordinate within the TList window, this command
407
returns the index of the TList element nearest to that coordinate.
408
</DL>
409
<DL>
410
<DT> <I>pathName <B>see <I>index</I></B>
411
</I></B>
412
<DD> Adjust the view in the TList so that the entry given by <I>index</I></B> is
413
visible. If the entry is already visible then the command has no
414
effect; if the entry is near one edge of the window then the TList
415
scrolls to bring the element into view at the edge; otherwise the
416
TList widget scrolls to center the entry.
417
</DL>
418
<DL>
419
<DT> <I>pathName <B>selection <I>option</I></B> <I>arg ...</I></B>
420
</I></B>
421
<DD> This command is used to adjust the selection within a TList widget. It
422
has several forms, depending on <I>option</I></B>:
423
</DL>
424
<UL>
425
<DL>
426
<DT> <I>pathName <B>selection clear </B></I>?<I>from</I></B>? ?<I>to</I></B>?
427
</I></B>
428
<DD> When no extra arguments are given, deselects all of the list entrie(s)
429
in this TList widget. When only <I>from</I></B> is given, only the list
430
entry identified by <I>from</I></B> is deselected. When both <I>from</I></B> and
431
<I>to</I></B> are given, deselects all of the list entrie(s) between
432
between <I>from</I></B> and <I>to</I></B>, inclusive, without affecting the
433
selection state of entries outside that range.
434
</DL>
435
<DL>
436
<DT> <I>pathName <B>selection includes <I>index</I></B>
437
</I></B>
438
<DD> Returns 1 if the list entry indicated by <I>index</I></B> is currently
439
selected; returns 0 otherwise.
440
</DL>
441
<DL>
442
<DT> <I>pathName <B>selection set <I>from</I></B> ?<I>to</I></B>?
443
</I></B>
444
<DD> Selects all of the list entrie(s) between between <I>from</I></B> and
445
<I>to</I></B>, inclusive, without affecting the selection state of entries
446
outside that range. When only <I>from</I></B> is given, only the list entry
447
identified by <I>from</I></B> is selected.
448
</DL>
449
</UL>
450
<DL>
451
<DT> <I>pathName <B>xview <I>args</I></B>
452
</I></B>
453
<DD> This command is used to query and change the horizontal position of the
454
forms:
455
</DL>
456
<UL>
457
<DL>
458
<DT> <I>pathName <B>xview</B></I>
459
</I></B>
460
<DD> Returns a list containing two elements.  Each element is a real
461
fraction between 0 and 1; together they describe the horizontal span
462
that is visible in the window.  For example, if the first element is
463
</DL>
464
 
465
off-screen to the left, the middle 40% is visible in the window, and
466
40% of the entry is off-screen to the right. These are the same values
467
passed to scrollbars via the <B>-xscrollcommand</B></I> option.
468
<DL>
469
<DT> <I>pathName <B>xview</B></I> <I>index</I></B>
470
</I></B>
471
<DD> Adjusts the view in the window so that the list entry identified by
472
<I>index</I></B> is aligned to the left edge of the window.
473
</DL>
474
<DL>
475
<DT> <I>pathName <B>xview moveto<I> fraction</I></B>
476
</I></B>
477
<DD> Adjusts the view in the window so that <I>fraction</I></B> of the total
478
width of the TList is off-screen to the left. <I>fraction</I></B> must be
479
a fraction between 0 and 1.
480
</DL>
481
<DL>
482
<DT> <I>pathName <B>xview scroll <I>number what</I></B>
483
</I></B>
484
<DD> This command shifts the view in the window left or right according to
485
<I>number</I></B> and <I>what</I></B>. <I>Number</I></B> must be an integer.
486
<I>What</I></B> must be either <B>units</B></I> or <B>pages</B></I> or an
487
abbreviation of one of these. If <I>what</I></B> is <B>units</B></I>, the view
488
adjusts left or right by <I>number</I></B> character units (the width of
489
the <B>0</B></I> character) on the display; if it is <B>pages</B></I> then the
490
view adjusts by <I>number</I></B> screenfuls. If <I>number</I></B> is negative
491
then characters farther to the left become visible; if it is positive
492
then characters farther to the right become visible.
493
</DL>
494
</UL>
495
<DL>
496
<DT> <I>pathName <B>yview <I>?args</I></B>?
497
</I></B>
498
<DD> This command is used to query and change the vertical position of the
499
</DL>
500
<UL>
501
<DL>
502
<DT> <I>pathName <B>yview</B></I>
503
</I></B>
504
<DD> Returns a list containing two elements, both of which are real
505
fractions between 0 and 1.  The first element gives the position of
506
the list element at the top of the window, relative to the TList as a
507
whole (0.5 means it is halfway through the TList, for example).  The
508
second element gives the position of the list entry just after the
509
last one in the window, relative to the TList as a whole.  These are
510
the same values passed to scrollbars via the <B>-yscrollcommand</B></I>
511
option.
512
</DL>
513
<DL>
514
<DT> <I>pathName <B>yview</B></I> <I>index</I></B>
515
</I></B>
516
<DD> Adjusts the view in the window so that the list entry given by
517
<I>index</I></B> is displayed at the top of the window.
518
</DL>
519
<DL>
520
<DT> <I>pathName <B>yview moveto<I> fraction</I></B>
521
</I></B>
522
<DD> Adjusts the view in the window so that the list entry given by
523
<I>fraction</I></B> appears at the top of the window. <I>Fraction</I></B> is a
524
fraction between 0 and 1; 0 indicates the first entry in the TList,
525
0.33 indicates the entry one-third the way through the TList, and so
526
on.
527
</DL>
528
<DL>
529
<DT> <I>pathName <B>yview scroll <I>number what</I></B>
530
</I></B>
531
<DD> This command adjust the view in the window up or down according to
532
<I>number</I></B> and <I>what</I></B>.  <I>Number</I></B> must be an integer.
533
<I>What</I></B> must be either <B>units</B></I> or <B>pages</B></I>.  If <I>what</I></B>
534
is <B>units</B></I>, the view adjusts up or down by <I>number</I></B> lines; if
535
it is <B>pages</B></I> then the view adjusts by <I>number</I></B> screenfuls.
536
If <I>number</I></B> is negative then earlier entries become visible; if
537
it is positive then later entries become visible.
538
</DL>
539
</UL>
540
</pre><H3>BINDINGS</H3>
541
<P>
542
<UL>
543
[1] <BR>
544
If the <B>-selectmode</B></I> is "browse", when the user drags the mouse
545
pointer over the list entries, the entry under the pointer will be
546
highlighted and the <B>-browsecmd</B></I> procedure will be called with
547
one parameter, the index of the highlighted entry. Only one entry
548
can be highlighted at a time. The <B>-command</B></I> procedure will be
549
called when the user double-clicks on a list entry.
550
</UL>
551
<UL>
552
[2] <BR>
553
If the <B>-selectmode</B></I> is "single", the entries will only be
554
highlighted by mouse &lt;ButtonRelease-1&gt; events. When a new list entry
555
is highlighted, the <B>-browsecmd</B></I> procedure will be called with
556
one parameter indicating the highlighted list entry. The
557
<B>-command</B></I> procedure will be called when the user double-clicks
558
on a list entry.
559
</UL>
560
<UL>
561
[3] <BR>
562
If the <B>-selectmode</B></I> is "multiple", when the user drags the mouse
563
pointer over the list entries, all the entries under the pointer will
564
be highlighted. However, only a contiguous region of list entries can
565
be selected. When the highlighted area is changed, the
566
<B>-browsecmd</B></I> procedure will be called with an undefined
567
parameter. It is the responsibility of the <B>-browsecmd</B></I> procedure
568
to find out the exact highlighted selection in the TList. The
569
<B>-command</B></I> procedure will be called when the user double-clicks
570
on a list entry.
571
</UL>
572
<UL>
573
[4] <BR>
574
If the <B>-selectmode</B></I> is "extended", when the user drags the mouse
575
pointer over the list entries, all the entries under the pointer will
576
be highlighted. The user can also make disjointed selections using
577
&lt;Control-ButtonPress-1&gt;. When the highlighted area is changed, the
578
<B>-browsecmd</B></I> procedure will be called with an undefined
579
parameter. It is the responsibility of the <B>-browsecmd</B></I> procedure
580
to find out the exact highlighted selection in the TList. The
581
<B>-command</B></I> procedure will be called when the user double-clicks
582
on a list entry.
583
</UL>
584
</pre><H3>EXAMPLE</H3>
585
<P>
586
This example demonstrates how to use an TList to store a list of
587
numbers:
588
<P>
589
\fC
590
<pre><code><code><code>
591
 set image [tix getimage folder]
592
 tixTList .t -orient vertical
593
 .t insert end -itemtype imagetext -image $image -text one
594
 .t insert end -itemtype imagetext -image $image -text two
595
 .t insert end -itemtype imagetext -image $image -text three
596
 .t insert end -itemtype imagetext -image $image -text four
597
 .t insert end -itemtype imagetext -image $image -text five
598
 .t insert end -itemtype imagetext -image $image -text six
599
 pack .t -expand yes -fill both
600
</code></code></code></pre>
601
</B></I>
602
</pre><H3>KEYWORDS</H3>
603
Tix(n), Tabular Listbox, Display Items
604
<!Serial 851729151>
605
<hr><i>Last modified Fri Jan 17 23:02:12 EST 1997 </i> ---
606
<i>Serial 853731306</i>

powered by: WebSVN 2.1.0

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