Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Tk::TList.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "TLIST 1"
132.TH TLIST 1 "2000-12-30" "perl v5.8.0" "User Contributed Perl Documentation"
133.SH "NAME"
134Tk::TList \- Create and manipulate Tix Tabular List widgets
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137\&\ \fI$tlist\fR = \fI$parent\fR\->\fBTList\fR(?\fIoptions\fR?);
138.SH "SUPER-CLASS"
139.IX Header "SUPER-CLASS"
140None.
141.SH "STANDARD OPTIONS"
142.IX Header "STANDARD OPTIONS"
143\&\fB\-background\fR \fB\-borderwidth\fR \fB\-class\fR \fB\-cursor\fR \fB\-foreground\fR
144\&\fB\-font\fR \fB\-height\fR \fB\-highlightcolor\fR \fB\-highlightthickness\fR
145\&\fB\-relief\fR \fB\-selectbackground\fR \fB\-selectforeground\fR
146\&\fB\-xscrollcommand\fR \fB\-yscrollcommand\fR \fB\-width\fR
147.PP
148See Tk::options for details of the standard options.
149.SH "WIDGET-SPECIFIC OPTIONS"
150.IX Header "WIDGET-SPECIFIC OPTIONS"
151.IP "Name: \fBbrowsecmd\fR" 4
152.IX Item "Name: browsecmd"
153.PD 0
154.IP "Class: \fBBrowseCmd\fR" 4
155.IX Item "Class: BrowseCmd"
156.IP "Switch: \fB\-browsecmd\fR" 4
157.IX Item "Switch: -browsecmd"
158.PD
159Specifies a perl/Tk \fBcallback\fR to be executed when the user browses through the
160entries in the TList widget.
161.IP "Name: \fBcommand\fR" 4
162.IX Item "Name: command"
163.PD 0
164.IP "Class: \fBCommand\fR" 4
165.IX Item "Class: Command"
166.IP "Switch: \fB\-command\fR" 4
167.IX Item "Switch: -command"
168.PD
169Specifies the perl/Tk \fBcallback\fR to be executed when the user invokes a list
170entry in the TList widget. Normally the user invokes a list
171entry by double-clicking it or pressing the Return key.
172.IP "Name: \fBforeground\fR" 4
173.IX Item "Name: foreground"
174.PD 0
175.IP "Class: \fBForeground\fR" 4
176.IX Item "Class: Foreground"
177.IP "Switch: \fB\-foreground\fR" 4
178.IX Item "Switch: -foreground"
179.IP "Alias: \fB\-fg\fR" 4
180.IX Item "Alias: -fg"
181.PD
182Specifies the default foreground color for the list entries.
183.IP "Name: \fBheight\fR" 4
184.IX Item "Name: height"
185.PD 0
186.IP "Class: \fBHeight\fR" 4
187.IX Item "Class: Height"
188.IP "Switch: \fB\-height\fR" 4
189.IX Item "Switch: -height"
190.PD
191Specifies the desired height for the window in number of characters.
192.IP "Name: \fBitemType\fR" 4
193.IX Item "Name: itemType"
194.PD 0
195.IP "Class: \fBItemType\fR" 4
196.IX Item "Class: ItemType"
197.IP "Switch: \fB\-itemtype\fR" 4
198.IX Item "Switch: -itemtype"
199.PD
200Specifies the default type of display item for this TList widget. When
201you call the \fBinsert\fR methods, display items of this
202type will be created if the \fB\-itemtype\fR option is not specified.
203.IP "Name: \fBorient\fR" 4
204.IX Item "Name: orient"
205.PD 0
206.IP "Class: \fBOrient\fR" 4
207.IX Item "Class: Orient"
208.IP "Switch: \fB\-orient\fR" 4
209.IX Item "Switch: -orient"
210.PD
211Specifies the order of tabularizing the list entries. When set to
212"\fBvertical\fR\*(L", the entries are arranged in a column, from top to
213bottom. If the entries cannot be contained in one column, the
214remaining entries will go to the next column, and so on. When set to
215\&\*(R"\fBhorizontal\fR", the entries are arranged in a row, from left to
216right. If the entries cannot be contained in one row, the remaining
217entries will go to the next row, and so on.
218.IP "Name: \fBpadX\fR" 4
219.IX Item "Name: padX"
220.PD 0
221.IP "Class: \fBPad\fR" 4
222.IX Item "Class: Pad"
223.IP "Switch: \fB\-padx\fR" 4
224.IX Item "Switch: -padx"
225.PD
226The default horizontal padding for list entries.
227.IP "Name: \fBpadY\fR" 4
228.IX Item "Name: padY"
229.PD 0
230.IP "Class: \fBPad\fR" 4
231.IX Item "Class: Pad"
232.IP "Switch: \fB\-padx\fR" 4
233.IX Item "Switch: -padx"
234.PD
235The default vertical padding for list entries.
236.IP "Name: \fBselectBackground\fR" 4
237.IX Item "Name: selectBackground"
238.PD 0
239.IP "Class: \fBSelectBackground\fR" 4
240.IX Item "Class: SelectBackground"
241.IP "Switch: \fB\-selectbackground\fR" 4
242.IX Item "Switch: -selectbackground"
243.PD
244Specifies the background color for the selected list entries.
245.IP "Name: \fBselectBorderWidth\fR" 4
246.IX Item "Name: selectBorderWidth"
247.PD 0
248.IP "Class: \fBBorderWidth\fR" 4
249.IX Item "Class: BorderWidth"
250.IP "Switch: \fB\-selectborderwidth\fR" 4
251.IX Item "Switch: -selectborderwidth"
252.PD
253Specifies a non-negative value indicating the width of the 3\-D border
254to draw around selected items. The value may have any of the forms
255acceptable to \fBTk_GetPixels\fR.
256.IP "Name: \fBselectForeground\fR" 4
257.IX Item "Name: selectForeground"
258.PD 0
259.IP "Class: \fBSelectForeground\fR" 4
260.IX Item "Class: SelectForeground"
261.IP "Switch: \fB\-selectforeground\fR" 4
262.IX Item "Switch: -selectforeground"
263.PD
264Specifies the foreground color for the selected list entries.
265.IP "Name: \fBselectMode\fR" 4
266.IX Item "Name: selectMode"
267.PD 0
268.IP "Class: \fBSelectMode\fR" 4
269.IX Item "Class: SelectMode"
270.IP "Switch: \fB\-selectmode\fR" 4
271.IX Item "Switch: -selectmode"
272.PD
273Specifies one of several styles for manipulating the selection. The
274value of the option may be arbitrary, but the default bindings expect
275it to be either \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or
276\&\fBextended\fR; the default value is \fBsingle\fR.
277.IP "Name: \fBsizeCmd\fR" 4
278.IX Item "Name: sizeCmd"
279.PD 0
280.IP "Class: \fBSizeCmd\fR" 4
281.IX Item "Class: SizeCmd"
282.IP "Switch: \fB\-sizecmd\fR" 4
283.IX Item "Switch: -sizecmd"
284.PD
285Specifies a perl/Tk \fBcallback\fR to be called whenever the TList widget
286changes its size. This command can be useful to implement \*(L"user scroll
287bars when needed\*(R" features.
288.IP "Name: \fBstate\fR" 4
289.IX Item "Name: state"
290.PD 0
291.IP "Class: \fBState\fR" 4
292.IX Item "Class: State"
293.IP "Switch: \fB\-state\fR" 4
294.IX Item "Switch: -state"
295.PD
296Specifies whether the TList command should react to user actions. When
297set to "\fBnormal\fR\*(L", the TList reacts to user actions in the normal
298way. When set to \*(R"\fBdisabled\fR", the TList can only be scrolled, but
299its entries cannot be selected or activated.
300.IP "Name: \fBwidth\fR" 4
301.IX Item "Name: width"
302.PD 0
303.IP "Class: \fBWidth\fR" 4
304.IX Item "Class: Width"
305.IP "Switch: \fB\-width\fR" 4
306.IX Item "Switch: -width"
307.PD
308Specifies the desired width for the window in characters.
309.SH "DESCRIPTION"
310.IX Header "DESCRIPTION"
311The \fBTList\fR method creates a new window (given by the
312\&\f(CW$widget\fR argument) and makes it into a TList widget.
313Additional options, described above, may be specified on the command
314line or in the option database to configure aspects of the
315TList widget such as its cursor and relief.
316.PP
317The TList widget can be used to display data in a tabular format. The
318list entries of a TList widget are similar to the entries in the Tk
319listbox widget. The main differences are (1) the TList widget can
320display the list entries in a two dimensional format and (2) you can
321use graphical images as well as multiple colors and fonts for
322the list entries.
323.PP
324Each list entry is identified by an \fBindex\fR, which can be in the
325following forms:
326.IP "\fInumber\fR" 4
327.IX Item "number"
328An integer that indicates the position of the entry in the list. 0
329means the first position, 1 means the second position, and so on.
330.IP "\fBend\fR" 4
331.IX Item "end"
332Indicates the end of the listbox. For some commands this means just
333after the last entry; for other commands it means the last entry.
334.IP "\fB@\fR\fIx\fR,\fIy\fR" 4
335.IX Item "@x,y"
336Indicates the element that covers the point in the listbox window
337specified by x and y (in pixel coordinates). If no element covers that
338point, then the closest element to that point is used.
339.SH "DISPLAY ITEMS"
340.IX Header "DISPLAY ITEMS"
341Each list entry in an TList widget is associated with a \fBdisplay\fR
342item. The display item determines what visual information should
343be displayed for this list entry. Please see Tk::DItem
344for a list of all display items.
345.PP
346When a list entry is created by the \fBinsert\fR command, the type of
347its display item is determined by the \fB\-itemtype\fR option passed
348to these commands. If the \fB\-itemtype\fR is omitted, then by default
349the type specified by this TList widget's \fB\-itemtype\fR option is
350used.
351.SH "WIDGET METHODS"
352.IX Header "WIDGET METHODS"
353The \fBTList\fR method creates a widget object.
354.PP
355This object supports the \fBconfigure\fR and \fBcget\fR methods
356described in Tk::options which can be used to enquire and
357modify the options described above.
358The widget also inherits all the methods provided by the generic
359Tk::Widget class.
360.PP
361The following additional methods are available for TList widgets:
362.IP "\fI$tlist\fR\->\fBanchorSet\fR(\fIindex\fR)" 4
363.IX Item "$tlist->anchorSet(index)"
364Sets the anchor to the list entry identified by \fIindex\fR. The
365anchor is the end of the selection that is fixed while dragging out a
366selection with the mouse.
367.IP "\fI$tlist\fR\->\fBanchorClear\fR" 4
368.IX Item "$tlist->anchorClear"
369Removes the anchor, if any, from this TList widget. This only removes
370the surrounding highlights of the anchor entry and does not affect its
371selection status.
372.IP "\fI$tlist\fR\->\fBdelete\fR(\fIfrom, \fR?\fIto\fR?)" 4
373.IX Item "$tlist->delete(from, ?to?)"
374Deletes one or more list entries between the two entries specified by
375the indices \fIfrom\fR and \fIto\fR. If \fIto\fR is not specified, deletes
376the single entry specified by \fIfrom\fR.
377.IP "\fI$tlist\fR\->\fBdragsiteSet\fR(\fIindex\fR)" 4
378.IX Item "$tlist->dragsiteSet(index)"
379Sets the dragsite to the list entry identified by
380\&\fIindex\fR. The dragsite is used to indicate the source of a
381drag-and-drop action. Currently drag-and-drop functionality has not
382been implemented in Tix yet.
383.IP "\fI$tlist\fR\->\fBdragsiteClear\fR" 4
384.IX Item "$tlist->dragsiteClear"
385Remove the dragsite, if any, from the this TList widget. This only
386removes the surrounding highlights of the dragsite entry and does not
387affect its selection status.
388.IP "\fI$tlist\fR\->\fBdropsiteSet\fR(\fIindex\fR)" 4
389.IX Item "$tlist->dropsiteSet(index)"
390Sets the dropsite to the list entry identified by \fIindex\fR. The
391dropsite is used to indicate the target of a drag-and-drop
392action. Currently drag-and-drop functionality has not been implemented
393in Tix yet.
394.IP "\fI$tlist\fR\->\fBdropsiteClear\fR" 4
395.IX Item "$tlist->dropsiteClear"
396Remove the dropsite, if any, from the this TList widget. This only
397removes the surrounding highlights of the dropsite entry and does not
398affect its selection status.
399.IP "\fI$tlist\fR\->\fBentrycget\fR(\fIindex, option\fR)" 4
400.IX Item "$tlist->entrycget(index, option)"
401Returns the current value of the configuration option given by
402\&\fIoption\fR for the entry indentfied by \fIindex\fR. \fIOption\fR may
403have any of the values accepted by the \fBinsert\fR method.
404.IP "\fI$tlist\fR\->\fBentryconfigure\fR(\fIindex, \fR?\fIoption\fR?, \fI?value, option, value, ...\fR?)" 4
405.IX Item "$tlist->entryconfigure(index, ?option?, ?value, option, value, ...?)"
406Query or modify the configuration options of the list entry identified
407by \fIindex\fR. If no \fIoption\fR is specified, returns a list
408describing all of the available options for \fIindex\fR (see
409\&\fBTk_ConfigureInfo\fR for information on the format of this list). If
410\&\fIoption\fR is specified with no \fIvalue\fR, then the method
411returns a list describing the one named option (this list will be
412identical to the corresponding sublist of the value returned if no
413\&\fIoption\fR is specified). If one or more \fIoption-value\fR pairs
414are specified, then the command modifies the given option(s) to have
415the given value(s); in this case the method returns an empty string.
416\&\fIOption\fR may have any of the values accepted by the \fBinsert\fR
417method. The exact set of options depends on the
418value of the \fB\-itemtype\fR option passed to the the \fBinsert\fR
419method when this list entry is created.
420.IP "\fI$tlist\fR\->\fBinsert\fR(\fIindex, \fR?\fIoption, value, ...\fR?)" 4
421.IX Item "$tlist->insert(index, ?option, value, ...?)"
422Creates a new list entry at the position indicated by \fIindex\fR. The
423following configuration options can be given to configure the list
424entry:
425.RS 4
426.IP "\fB\-itemtype\fR => \fItype\fR" 8
427.IX Item "-itemtype => type"
428Specifies the type of display item to be display for the new list
429entry. \fItype\fR must be a valid display item type. Currently the
430available display item types are \fBimage\fR, \fBimagetext\fR,
431\&\fBtext\fR, and \fI$widget\fR. If this option is not specified, then by
432default the type specified by this TList widget's \fB\-itemtype\fR
433option is used.
434.IP "\fB\-state\fR => \fIstate\fR" 8
435.IX Item "-state => state"
436Specifies whether this entry can be selected or invoked by the user.
437Must be either \fBnormal\fR or \fBdisabled\fR.
438.IP "\fB\-data\fR => \fIdata\fR" 8
439.IX Item "-data => data"
440Arbitrary data to be associated with the entry (a perl scalar value).
441.RE
442.RS 4
443.Sp
444The \fBinsert\fR method accepts additional configuration options
445to configure the display item associated with this list entry. The set
446of additional configuration options depends on the type of the display
447item given by the \fB\-itemtype\fR option. Please see
448Tk::DItem for a list of the configuration options for
449each of the display item types.
450.RE
451.IP "\fI$tlist\fR\->\fBinfo\fR(\fIoption, \fR\fIarg, ...\fR)" 4
452.IX Item "$tlist->info(option, arg, ...)"
453Query information about the TList widget. \fIoption\fR can be one
454of the following:
455.RS 4
456.IP "\fI$tlist\fR\->\fBinfo\fR(\fBanchor, \fR\fIindex\fR)" 8
457.IX Item "$tlist->info(anchor, index)"
458Returns the index of the current anchor, if any, of the TList
459widget. If the anchor is not set, returns the empty string.
460.IP "\fI$tlist\fR\->\fBinfo\fR(\fBdragsite, \fR\fIindex\fR)" 8
461.IX Item "$tlist->info(dragsite, index)"
462Returns the index of the current dragsite, if any, of the TList
463widget. If the dragsite is not set, returns the empty string.
464.IP "\fI$tlist\fR\->\fBinfo\fR(\fBdropsite, \fR\fIindex\fR)" 8
465.IX Item "$tlist->info(dropsite, index)"
466Returns the index of the current dropsite, if any, of the TList
467widget. If the dropsite is not set, returns the empty string.
468.IP "\fI$tlist\fR\->\fBinfo\fR(\fBselection\fR)" 8
469.IX Item "$tlist->info(selection)"
470Returns a list of selected elements in the TList widget. If no entries
471are selected, returns an empty string.
472.RE
473.RS 4
474.RE
475.IP "\fI$tlist\fR\->\fBnearest\fR(\fIx, y\fR)" 4
476.IX Item "$tlist->nearest(x, y)"
477Given an \fI(x,y)\fR coordinate within the TList window, this command
478returns the index of the TList element nearest to that coordinate.
479.IP "\fI$tlist\fR\->\fBsee\fR(\fIindex\fR)" 4
480.IX Item "$tlist->see(index)"
481Adjust the view in the TList so that the entry given by \fIindex\fR is
482visible. If the entry is already visible then the command has no
483effect; otherwise TList scrolls to bring the element into view at the edge
484to which it is nearest.
485.IP "\fI$tlist\fR\->\fBselection\fR(\fIoption, \fR\fIarg, ...\fR)" 4
486.IX Item "$tlist->selection(option, arg, ...)"
487This command is used to adjust the selection within a TList widget. It
488has several forms, depending on \fIoption\fR:
489.RS 4
490.IP "\fI$tlist\fR\->\fBselectionClear\fR(?\fIfrom\fR?, ?\fIto\fR?)" 8
491.IX Item "$tlist->selectionClear(?from?, ?to?)"
492When no extra arguments are given, deselects all of the list entrie(s)
493in this TList widget. When only \fIfrom\fR is given, only the list
494entry identified by \fIfrom\fR is deselected. When both \fIfrom\fR and
495\&\fIto\fR are given, deselects all of the list entrie(s) between
496between \fIfrom\fR and \fIto\fR, inclusive, without affecting the
497selection state of entries outside that range.
498.IP "\fI$tlist\fR\->\fBselectionIncludes\fR(\fIindex\fR)" 8
499.IX Item "$tlist->selectionIncludes(index)"
500Returns 1 if the list entry indicated by \fIindex\fR is currently
501selected; returns 0 otherwise.
502.IP "\fI$tlist\fR\->\fBselectionSet\fR(\fIfrom, \fR?\fIto\fR?)" 8
503.IX Item "$tlist->selectionSet(from, ?to?)"
504Selects all of the list entrie(s) between between \fIfrom\fR and
505\&\fIto\fR, inclusive, without affecting the selection state of entries
506outside that range. When only \fIfrom\fR is given, only the list entry
507identified by \fIfrom\fR is selected.
508.RE
509.RS 4
510.RE
511.IP "\fI$tlist\fR\->\fBxview\fR(\fIargs\fR)" 4
512.IX Item "$tlist->xview(args)"
513This command is used to query and change the horizontal position of the
514information in the widget's window. It can take any of the following
515forms:
516.RS 4
517.IP "\fI$tlist\fR\->\fBxview\fR" 8
518.IX Item "$tlist->xview"
519Returns a list containing two elements. Each element is a real
520fraction between 0 and 1; together they describe the horizontal span
521that is visible in the window. For example, if the first element is
5220.2 and the second element is 0.6, 20% of the TList entry is
523off-screen to the left, the middle 40% is visible in the window, and
52440% of the entry is off-screen to the right. These are the same values
525passed to scrollbars via the \fB\-xscrollcommand\fR option.
526.IP "\fI$tlist\fR\->\fBxview\fR(\fIindex\fR)" 8
527.IX Item "$tlist->xview(index)"
528Adjusts the view in the window so that the list entry identified by
529\&\fIindex\fR is aligned to the left edge of the window.
530.IP "\fI$tlist\fR\->\fBxviewMoveto\fR(\fIfraction\fR)" 8
531.IX Item "$tlist->xviewMoveto(fraction)"
532Adjusts the view in the window so that \fIfraction\fR of the total
533width of the TList is off-screen to the left. \fIfraction\fR must be
534a fraction between 0 and 1.
535.IP "\fI$tlist\fR\->\fBxviewScroll\fR(\fInumber, what\fR)" 8
536.IX Item "$tlist->xviewScroll(number, what)"
537This command shifts the view in the window left or right according to
538\&\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer.
539\&\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an
540abbreviation of one of these. If \fIwhat\fR is \fBunits\fR, the view
541adjusts left or right by \fInumber\fR character units (the width of
542the \fB0\fR character) on the display; if it is \fBpages\fR then the
543view adjusts by \fInumber\fR screenfuls. If \fInumber\fR is negative
544then characters farther to the left become visible; if it is positive
545then characters farther to the right become visible.
546.RE
547.RS 4
548.RE
549.IP "\fI$tlist\fR\->\fByview\fR(\fI?args\fR?)" 4
550.IX Item "$tlist->yview(?args?)"
551This command is used to query and change the vertical position of the
552entries in the widget's window. It can take any of the following forms:
553.RS 4
554.IP "\fI$tlist\fR\->\fByview\fR" 8
555.IX Item "$tlist->yview"
556Returns a list containing two elements, both of which are real
557fractions between 0 and 1. The first element gives the position of
558the list element at the top of the window, relative to the TList as a
559whole (0.5 means it is halfway through the TList, for example). The
560second element gives the position of the list entry just after the
561last one in the window, relative to the TList as a whole. These are
562the same values passed to scrollbars via the \fB\-yscrollcommand\fR
563option.
564.IP "\fI$tlist\fR\->\fByview\fR(\fIindex\fR)" 8
565.IX Item "$tlist->yview(index)"
566Adjusts the view in the window so that the list entry given by
567\&\fIindex\fR is displayed at the top of the window.
568.IP "\fI$tlist\fR\->\fByviewMoveto\fR(\fIfraction\fR)" 8
569.IX Item "$tlist->yviewMoveto(fraction)"
570Adjusts the view in the window so that the list entry given by
571\&\fIfraction\fR appears at the top of the window. \fIFraction\fR is a
572fraction between 0 and 1; 0 indicates the first entry in the TList,
5730.33 indicates the entry one-third the way through the TList, and so
574on.
575.IP "\fI$tlist\fR\->\fByviewScroll\fR(\fInumber, what\fR)" 8
576.IX Item "$tlist->yviewScroll(number, what)"
577This command adjust the view in the window up or down according to
578\&\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer.
579\&\fIWhat\fR must be either \fBunits\fR or \fBpages\fR. If \fIwhat\fR
580is \fBunits\fR, the view adjusts up or down by \fInumber\fR lines; if
581it is \fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
582If \fInumber\fR is negative then earlier entries become visible; if
583it is positive then later entries become visible.
584.RE
585.RS 4
586.RE
587.SH "BINDINGS"
588.IX Header "BINDINGS"
589.IP "[1]" 4
590.IX Item "[1]"
591If the \fB\-selectmode\fR is \*(L"browse\*(R", when the user drags the mouse
592pointer over the list entries, the entry under the pointer will be
593highlighted and the \fB\-browsecmd\fR procedure will be called with
594one parameter, the index of the highlighted entry. Only one entry
595can be highlighted at a time. The \fB\-command\fR procedure will be
596called when the user double-clicks on a list entry.
597.IP "[2]" 4
598.IX Item "[2]"
599If the \fB\-selectmode\fR is \*(L"single\*(R", the entries will only be
600highlighted by mouse <ButtonRelease\-1> events. When a new list entry
601is highlighted, the \fB\-browsecmd\fR procedure will be called with
602one parameter indicating the highlighted list entry. The
603\&\fB\-command\fR procedure will be called when the user double-clicks
604on a list entry.
605.IP "[3]" 4
606.IX Item "[3]"
607If the \fB\-selectmode\fR is \*(L"multiple\*(R", when the user drags the mouse
608pointer over the list entries, all the entries under the pointer will
609be highlighted. However, only a contiguous region of list entries can
610be selected. When the highlighted area is changed, the
611\&\fB\-browsecmd\fR procedure will be called with an undefined
612parameter. It is the responsibility of the \fB\-browsecmd\fR procedure
613to find out the exact highlighted selection in the TList. The
614\&\fB\-command\fR procedure will be called when the user double-clicks
615on a list entry.
616.IP "[4]" 4
617.IX Item "[4]"
618If the \fB\-selectmode\fR is \*(L"extended\*(R", when the user drags the mouse
619pointer over the list entries, all the entries under the pointer will
620be highlighted. The user can also make disjointed selections using
621<Control\-ButtonPress\-1>. When the highlighted area is changed, the
622\&\fB\-browsecmd\fR procedure will be called with an undefined
623parameter. It is the responsibility of the \fB\-browsecmd\fR procedure
624to find out the exact highlighted selection in the TList. The
625\&\fB\-command\fR procedure will be called when the user double-clicks
626on a list entry.
627.SH "EXAMPLE"
628.IX Header "EXAMPLE"
629This example demonstrates how to use an TList to store a list of
630numbers:
631.PP
632.Vb 3
633\& use strict;
634\& use Tk ();
635\& use Tk::TList;
636.Ve
637.PP
638.Vb 7
639\& my $mw = Tk::MainWindow->new();
640\& my $image = $mw->Getimage('folder');
641\& my $tlist = $mw->TList(-orient => 'vertical');
642\& for my $text ( qw/one two three four five six seven eight nine/ ) {
643\& $tlist->insert('end',
644\& -itemtype=>'imagetext', -image=>$image, -text=>$text);
645\& }
646.Ve
647.PP
648.Vb 1
649\& $tlist->pack(-expand=>'yes', -fill=>'both');
650.Ve
651.PP
652.Vb 1
653\& Tk::MainLoop;
654.Ve
655.SH "SEE ALSO"
656.IX Header "SEE ALSO"
657Tk::options
658Tk::Widget
659Tk::DItem
660Tk::HList
661Tk::TixGrid
662.SH "KEYWORDS"
663.IX Header "KEYWORDS"
664Tix(n), Tabular Listbox, Display Items