OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/hostdependX86LINUX64.git] / util / X86LINUX64 / man / mann / ttk_treeview.n
1 '\"
2 '\" Copyright (c) 2004 Joe English
3 '\"
4 '\" See the file "license.terms" for information on usage and redistribution
5 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6 '\" 
7 .TH ttk::treeview n 8.5 Tk "Tk Themed Widget"
8 .\" The -*- nroff -*- definitions below are for supplemental macros used
9 .\" in Tcl/Tk manual entries.
10 .\"
11 .\" .AP type name in/out ?indent?
12 .\"     Start paragraph describing an argument to a library procedure.
13 .\"     type is type of argument (int, etc.), in/out is either "in", "out",
14 .\"     or "in/out" to describe whether procedure reads or modifies arg,
15 .\"     and indent is equivalent to second arg of .IP (shouldn't ever be
16 .\"     needed;  use .AS below instead)
17 .\"
18 .\" .AS ?type? ?name?
19 .\"     Give maximum sizes of arguments for setting tab stops.  Type and
20 .\"     name are examples of largest possible arguments that will be passed
21 .\"     to .AP later.  If args are omitted, default tab stops are used.
22 .\"
23 .\" .BS
24 .\"     Start box enclosure.  From here until next .BE, everything will be
25 .\"     enclosed in one large box.
26 .\"
27 .\" .BE
28 .\"     End of box enclosure.
29 .\"
30 .\" .CS
31 .\"     Begin code excerpt.
32 .\"
33 .\" .CE
34 .\"     End code excerpt.
35 .\"
36 .\" .VS ?version? ?br?
37 .\"     Begin vertical sidebar, for use in marking newly-changed parts
38 .\"     of man pages.  The first argument is ignored and used for recording
39 .\"     the version when the .VS was added, so that the sidebars can be
40 .\"     found and removed when they reach a certain age.  If another argument
41 .\"     is present, then a line break is forced before starting the sidebar.
42 .\"
43 .\" .VE
44 .\"     End of vertical sidebar.
45 .\"
46 .\" .DS
47 .\"     Begin an indented unfilled display.
48 .\"
49 .\" .DE
50 .\"     End of indented unfilled display.
51 .\"
52 .\" .SO ?manpage?
53 .\"     Start of list of standard options for a Tk widget. The manpage
54 .\"     argument defines where to look up the standard options; if
55 .\"     omitted, defaults to "options". The options follow on successive
56 .\"     lines, in three columns separated by tabs.
57 .\"
58 .\" .SE
59 .\"     End of list of standard options for a Tk widget.
60 .\"
61 .\" .OP cmdName dbName dbClass
62 .\"     Start of description of a specific option.  cmdName gives the
63 .\"     option's name as specified in the class command, dbName gives
64 .\"     the option's name in the option database, and dbClass gives
65 .\"     the option's class in the option database.
66 .\"
67 .\" .UL arg1 arg2
68 .\"     Print arg1 underlined, then print arg2 normally.
69 .\"
70 .\" .QW arg1 ?arg2?
71 .\"     Print arg1 in quotes, then arg2 normally (for trailing punctuation).
72 .\"
73 .\" .PQ arg1 ?arg2?
74 .\"     Print an open parenthesis, arg1 in quotes, then arg2 normally
75 .\"     (for trailing punctuation) and then a closing parenthesis.
76 .\"
77 .\"     # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
78 .if t .wh -1.3i ^B
79 .nr ^l \n(.l
80 .ad b
81 .\"     # Start an argument description
82 .de AP
83 .ie !"\\$4"" .TP \\$4
84 .el \{\
85 .   ie !"\\$2"" .TP \\n()Cu
86 .   el          .TP 15
87 .\}
88 .ta \\n()Au \\n()Bu
89 .ie !"\\$3"" \{\
90 \&\\$1 \\fI\\$2\\fP (\\$3)
91 .\".b
92 .\}
93 .el \{\
94 .br
95 .ie !"\\$2"" \{\
96 \&\\$1  \\fI\\$2\\fP
97 .\}
98 .el \{\
99 \&\\fI\\$1\\fP
100 .\}
101 .\}
102 ..
103 .\"     # define tabbing values for .AP
104 .de AS
105 .nr )A 10n
106 .if !"\\$1"" .nr )A \\w'\\$1'u+3n
107 .nr )B \\n()Au+15n
108 .\"
109 .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
110 .nr )C \\n()Bu+\\w'(in/out)'u+2n
111 ..
112 .AS Tcl_Interp Tcl_CreateInterp in/out
113 .\"     # BS - start boxed text
114 .\"     # ^y = starting y location
115 .\"     # ^b = 1
116 .de BS
117 .br
118 .mk ^y
119 .nr ^b 1u
120 .if n .nf
121 .if n .ti 0
122 .if n \l'\\n(.lu\(ul'
123 .if n .fi
124 ..
125 .\"     # BE - end boxed text (draw box now)
126 .de BE
127 .nf
128 .ti 0
129 .mk ^t
130 .ie n \l'\\n(^lu\(ul'
131 .el \{\
132 .\"     Draw four-sided box normally, but don't draw top of
133 .\"     box if the box started on an earlier page.
134 .ie !\\n(^b-1 \{\
135 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
136 .\}
137 .el \}\
138 \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
139 .\}
140 .\}
141 .fi
142 .br
143 .nr ^b 0
144 ..
145 .\"     # VS - start vertical sidebar
146 .\"     # ^Y = starting y location
147 .\"     # ^v = 1 (for troff;  for nroff this doesn't matter)
148 .de VS
149 .if !"\\$2"" .br
150 .mk ^Y
151 .ie n 'mc \s12\(br\s0
152 .el .nr ^v 1u
153 ..
154 .\"     # VE - end of vertical sidebar
155 .de VE
156 .ie n 'mc
157 .el \{\
158 .ev 2
159 .nf
160 .ti 0
161 .mk ^t
162 \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
163 .sp -1
164 .fi
165 .ev
166 .\}
167 .nr ^v 0
168 ..
169 .\"     # Special macro to handle page bottom:  finish off current
170 .\"     # box/sidebar if in box/sidebar mode, then invoked standard
171 .\"     # page bottom macro.
172 .de ^B
173 .ev 2
174 'ti 0
175 'nf
176 .mk ^t
177 .if \\n(^b \{\
178 .\"     Draw three-sided box if this is the box's first page,
179 .\"     draw two sides but no top otherwise.
180 .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
181 .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
182 .\}
183 .if \\n(^v \{\
184 .nr ^x \\n(^tu+1v-\\n(^Yu
185 \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
186 .\}
187 .bp
188 'fi
189 .ev
190 .if \\n(^b \{\
191 .mk ^y
192 .nr ^b 2
193 .\}
194 .if \\n(^v \{\
195 .mk ^Y
196 .\}
197 ..
198 .\"     # DS - begin display
199 .de DS
200 .RS
201 .nf
202 .sp
203 ..
204 .\"     # DE - end display
205 .de DE
206 .fi
207 .RE
208 .sp
209 ..
210 .\"     # SO - start of list of standard options
211 .de SO
212 'ie '\\$1'' .ds So \\fBoptions\\fR
213 'el .ds So \\fB\\$1\\fR
214 .SH "STANDARD OPTIONS"
215 .LP
216 .nf
217 .ta 5.5c 11c
218 .ft B
219 ..
220 .\"     # SE - end of list of standard options
221 .de SE
222 .fi
223 .ft R
224 .LP
225 See the \\*(So manual entry for details on the standard options.
226 ..
227 .\"     # OP - start of full description for a single option
228 .de OP
229 .LP
230 .nf
231 .ta 4c
232 Command-Line Name:      \\fB\\$1\\fR
233 Database Name:  \\fB\\$2\\fR
234 Database Class: \\fB\\$3\\fR
235 .fi
236 .IP
237 ..
238 .\"     # CS - begin code excerpt
239 .de CS
240 .RS
241 .nf
242 .ta .25i .5i .75i 1i
243 ..
244 .\"     # CE - end code excerpt
245 .de CE
246 .fi
247 .RE
248 ..
249 .\"     # UL - underline word
250 .de UL
251 \\$1\l'|0\(ul'\\$2
252 ..
253 .\"     # QW - apply quotation marks to word
254 .de QW
255 .ie '\\*(lq'"' ``\\$1''\\$2
256 .\"" fix emacs highlighting
257 .el \\*(lq\\$1\\*(rq\\$2
258 ..
259 .\"     # PQ - apply parens and quotation marks to word
260 .de PQ
261 .ie '\\*(lq'"' (``\\$1''\\$2)\\$3
262 .\"" fix emacs highlighting
263 .el (\\*(lq\\$1\\*(rq\\$2)\\$3
264 ..
265 .\"     # QR - quoted range
266 .de QR
267 .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
268 .\"" fix emacs highlighting
269 .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
270 ..
271 .\"     # MT - "empty" string
272 .de MT
273 .QW ""
274 ..
275 .BS
276 .SH NAME
277 ttk::treeview \- hierarchical multicolumn data display widget
278 .SH SYNOPSIS
279 \fBttk::treeview \fIpathname \fR?\fIoptions\fR?
280 .BE
281 .SH DESCRIPTION
282 .PP
283 The \fBttk::treeview\fR widget displays a hierarchical collection of items.
284 Each item has a textual label, an optional image, 
285 and an optional list of data values.
286 The data values are displayed in successive columns after
287 the tree label.
288 .PP
289 The order in which data values are displayed may be controlled
290 by setting the \fB\-displaycolumns\fR widget option.  
291 The tree widget can also display column headings.
292 Columns may be accessed by number or by symbolic names 
293 listed in the \fB\-columns\fR widget option;
294 see \fBCOLUMN IDENTIFIERS\fR.
295 .PP
296 Each item is identified by a unique name.
297 The widget will generate item IDs if they are not supplied by the caller.
298 There is a distinguished root item, named \fB{}\fR.
299 The root item itself is not displayed;
300 its children appear at the top level of the hierarchy.
301 .PP
302 Each item also has a list of \fItags\fR,
303 which can be used to associate event bindings with individual items
304 and control the appearance of the item.
305 .\" .PP
306 .\" @@@HERE: describe selection, focus item
307 .PP
308 Treeview widgets support horizontal and vertical scrolling with the
309 standard \fB\-\fR[\fBxy\fR]\fBscrollcommand\fR options 
310 and [\fBxy\fR]\fBview\fR widget commands.
311 .SO ttk_widget
312 \-class \-cursor        \-takefocus
313 \-style \-xscrollcommand        \-yscrollcommand
314 .SE
315 .SH "WIDGET-SPECIFIC OPTIONS"
316 .OP \-columns columns Columns
317 A list of column identifiers, 
318 specifying the number of columns and their names.
319 .\"X: This is a read-only option; it may only be set when the widget is created.
320 .OP \-displaycolumns displayColumns DisplayColumns
321 A list of column identifiers 
322 (either symbolic names or integer indices)
323 specifying which data columns are displayed 
324 and the order in which they appear, 
325 or the string \fB#all\fP.
326 If set to \fB#all\fP (the default),
327 all columns are shown in the order given.
328 .OP \-height height Height
329 Specifies the number of rows which should be visible.
330 Note:
331 the requested width is determined from the sum of the column widths.
332 .OP \-padding padding Padding
333 Specifies the internal padding for the widget.
334 The padding is a list of up to four length specifications;
335 see \fBTtk_GetPaddingFromObj()\fR for details.
336 .OP \-selectmode selectMode SelectMode
337 Controls how the built-in class bindings manage the selection.
338 One of \fBextended\fR, \fBbrowse\fR, or \fBnone\fR.
339 .RS
340 .PP
341 If set to \fBextended\fR (the default), multiple items may be selected.
342 If \fBbrowse\fR, only a single item will be selected at a time.
343 If \fBnone\fR, the selection will not be changed.
344 .PP
345 Note that application code and tag bindings can set the selection 
346 however they wish, regardless of the value of \fB\-selectmode\fR.
347 .RE
348 .OP \-show show Show
349 A list containing zero or more of the following values, specifying
350 which elements of the tree to display.
351 .RS
352 .IP \fBtree\fR
353 Display tree labels in column #0.  
354 .IP \fBheadings\fR
355 Display the heading row.
356 .PP
357 The default is \fBtree headings\fR, i.e., show all elements.
358 .PP
359 \fBNOTE:\fR Column #0 always refers to the tree column,
360 even if \fB\-show tree\fR is not specified.
361 .RE
362 .SH "WIDGET COMMAND"
363 .PP
364 .TP
365 \fIpathname \fBbbox \fIitem\fR ?\fIcolumn\fR?
366 Returns the bounding box (relative to the treeview widget's window)
367 of the specified \fIitem\fR
368 in the form \fIx y width height\fR.
369 If \fIcolumn\fR is specified, returns the bounding box of that cell.
370 If the \fIitem\fR is not visible
371 (i.e., if it is a descendant of a closed item or is scrolled offscreen),
372 returns the empty list.
373 .TP
374 \fIpathname \fBcget \fIoption\fR
375 Returns the current value of the specified \fIoption\fR; see \fIttk::widget(n)\fR.
376 .TP
377 \fIpathname \fBchildren \fIitem\fR ?\fInewchildren\fR?
378 If \fInewchildren\fR is not specified,
379 returns the list of children belonging to \fIitem\fR.
380 .RS
381 .PP
382 If \fInewchildren\fR is specified, replaces \fIitem\fR's child list
383 with \fInewchildren\fR.  
384 Items in the old child list not present in the new child list
385 are detached from the tree.
386 None of the items in \fInewchildren\fR may be an ancestor
387 of \fIitem\fR.
388 .RE
389 .TP
390 \fIpathname \fBcolumn \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
391 Query or modify the options for the specified \fIcolumn\fR.
392 If no \fI\-option\fR is specified,
393 returns a dictionary of option/value pairs.
394 If a single \fI\-option\fR is specified, 
395 returns the value of that option.
396 Otherwise, the options are updated with the specified values.
397 The following options may be set on each column:
398 .RS
399 .TP
400 \fB\-id \fIname\fR
401 The column name.  This is a read-only option.
402 For example, [\fI$pathname \fBcolumn #\fIn \fB\-id\fR]
403 returns the data column associated with display column #\fIn\fR. 
404 .TP
405 \fB\-anchor\fR
406 Specifies how the text in this column should be aligned
407 with respect to the cell. One of
408 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
409 \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR.
410 .TP
411 \fB\-minwidth\fR
412 The minimum width of the column in pixels.
413 The treeview widget will not make the column any smaller than
414 \fB\-minwidth\fR when the widget is resized or the user drags a 
415 column separator.
416 .TP
417 \fB\-stretch\fR
418 Specifies whether or not the column's width should be adjusted
419 when the widget is resized.
420 .TP
421 \fB\-width \fIw\fR
422 The width of the column in pixels.  Default is something reasonable,
423 probably 200 or so.
424 .PP
425 Use \fIpathname column #0\fR to configure the tree column.
426 .RE
427 .TP
428 \fIpathname \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
429 Modify or query widget options; see \fIttk::widget(n)\fR.
430 .TP
431 \fIpathname \fBdelete \fIitemList\fR
432 Deletes each of the items in \fIitemList\fR and all of their descendants.
433 The root item may not be deleted.
434 See also: \fBdetach\fR.
435 .TP
436 \fIpathname \fBdetach \fIitemList\fR
437 Unlinks all of the specified items in \fIitemList\fR from the tree.
438 The items and all of their descendants are still present
439 and may be reinserted at another point in the tree
440 with the \fBmove\fR operation,
441 but will not be displayed until that is done.
442 The root item may not be detached.
443 See also: \fBdelete\fR.
444 .TP
445 \fIpathname \fBexists \fIitem\fR
446 Returns 1 if the specified \fIitem\fR is present in the tree,
447 0 otherwise.
448 .TP
449 \fIpathname \fBfocus \fR?\fIitem\fR?
450 If \fIitem\fR is specified, sets the focus item to \fIitem\fR.
451 Otherwise, returns the current focus item, or \fB{}\fR if there is none.
452 .\" Need: way to clear the focus item.  {} works for this...
453 .TP 
454 \fIpathname \fBheading \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
455 Query or modify the heading options for the specified \fIcolumn\fR.
456 Valid options are:
457 .RS
458 .TP
459 \fB\-text \fItext\fR
460 The text to display in the column heading.
461 .TP
462 \fB\-image \fIimageName\fR
463 Specifies an image to display to the right of the column heading.
464 .TP
465 \fB\-anchor \fIanchor\fR
466 Specifies how the heading text should be aligned.
467 One of the standard Tk anchor values.
468 .TP
469 \fB\-command \fIscript\fR
470 A script to evaluate when the heading label is pressed.
471 .PP
472 Use \fIpathname heading #0\fR to configure the tree column heading.
473 .RE
474 .TP
475 \fIpathname \fBidentify \fIcomponent x y\fR
476 Returns a description of the specified \fIcomponent\fR
477 under the point given by \fIx\fR and \fIy\fR,
478 or the empty string if no such \fIcomponent\fR is present at that position.
479 The following subcommands are supported:
480 .RS
481 .TP
482 \fIpathname \fBidentify region \fIx y\fR
483 .RS
484 Returns one of:
485 .IP heading
486 Tree heading area;
487 use [\fBpathname identify column \fIx y\fR]
488 to determine the heading number.
489 .IP separator
490 Space between two column headings;
491 [\fBpathname identify column \fIx y\fR]
492 will return the display column identifier
493 of the heading to left of the separator.
494 .IP tree
495 The tree area.
496 .IP cell
497 A data cell.
498 .RE
499 \fIpathname \fBidentify item \fIx y\fR
500 Returns the item ID of the item at position \fIy\fR.
501 .TP
502 \fIpathname \fBidentify column \fIx y\fR
503 Returns the data column identifier of the cell at position \fIx\fR.
504 The tree column has ID \fB#0\fR.
505 .TP
506 \fIpathname \fBidentify element \fIx y\fR
507 The element at position \fIx,y\fR.
508 .TP
509 \fIpathname \fBidentify row \fIx y\fR
510 Obsolescent synonym for \fIpathname \fBidentify item\fR.
511 .PP
512 See \fBCOLUMN IDENTIFIERS\fR for a discussion of display columns
513 and data columns.
514 .RE
515 .TP
516 \fIpathname \fBindex \fIitem\fR
517 Returns the integer index of \fIitem\fR within its parent's list of children.
518 .TP
519 \fIpathname \fBinsert \fIparent index\fR ?\fB\-id \fIid\fR? \fIoptions...\fR
520 Creates a new item.  
521 \fIparent\fR is the item ID of the parent item,
522 or the empty string \fB{}\fR
523 to create a new top-level item.
524 \fIindex\fR is an integer, or the value \fBend\fR, specifying where in the
525 list of \fIparent\fR's children to insert the new item.
526 If \fIindex\fR is less than or equal to zero, 
527 the new node is inserted at the beginning;
528 if \fIindex\fR is greater than or equal to the current number of children,
529 it is inserted at the end.
530 If \fB\-id\fR is specified, it is used as the item identifier;
531 \fIid\fR must not already exist in the tree.
532 Otherwise, a new unique identifier is generated.
533 .RS
534 .PP
535 \fIpathname \fBinsert\fR returns the item identifier of the
536 newly created item.
537 See \fBITEM OPTIONS\fR for the list of available options.
538 .RE
539 .TP
540 \fIpathname \fBinstate \fIstatespec\fR ?\fIscript\fR?
541 Test the widget state; see \fIttk::widget(n)\fR.
542 .TP
543 \fIpathname \fBitem \fIitem\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
544 Query or modify the options for the specified \fIitem\fR.
545 If no \fI\-option\fR is specified, 
546 returns a dictionary of option/value pairs.
547 If a single \fI\-option\fR is specified, 
548 returns the value of that option.
549 Otherwise, the item's options are updated with the specified values.
550 See \fBITEM OPTIONS\fR for the list of available options.
551 .TP
552 \fIpathname \fBmove \fIitem parent index\fR
553 Moves \fIitem\fR to position \fIindex\fR in \fIparent\fR's list of children.
554 It is illegal to move an item under one of its descendants.
555 .RS
556 .PP
557 If \fIindex\fR is less than or equal to zero, \fIitem\fR is moved
558 to the beginning; if greater than or equal to the number of children,
559 it is moved to the end.
560 .RE
561 .TP 
562 \fIpathname \fBnext \fIitem\fR
563 Returns the identifier of \fIitem\fR's next sibling,
564 or \fB{}\fR if \fIitem\fR is the last child of its parent.
565 .TP
566 \fIpathname \fBparent \fIitem\fR
567 Returns the ID of the parent of \fIitem\fR,
568 or \fB{}\fR if \fIitem\fR is at the top level of the hierarchy.
569 .TP 
570 \fIpathname \fBprev \fIitem\fR
571 Returns the identifier of \fIitem\fR's previous sibling,
572 or \fB{}\fR if \fIitem\fR is the first child of its parent.
573 .TP
574 \fIpathname \fBsee \fIitem\fR
575 Ensure that \fIitem\fR is visible:
576 sets all of \fIitem\fR's ancestors to \fB\-open true\fR,
577 and scrolls the widget if necessary so that \fIitem\fR is 
578 within the visible portion of the tree.
579 .TP
580 \fIpathname \fBselection\fR ?\fIselop itemList\fR?
581 If \fIselop\fR is not specified, returns the list of selected items.
582 Otherwise, \fIselop\fR is one of the following:
583 .RS
584 .TP
585 \fIpathname \fBselection set \fIitemList\fR
586 \fIitemList\fR becomes the new selection.
587 .TP
588 \fIpathname \fBselection add \fIitemList\fR
589 Add \fIitemList\fR to the selection
590 .TP
591 \fIpathname \fBselection remove \fIitemList\fR
592 Remove \fIitemList\fR from the selection
593 .TP
594 \fIpathname \fBselection toggle \fIitemList\fR
595 Toggle the selection state of each item in \fIitemList\fR.
596 .RE
597 .TP
598 \fIpathname \fBset \fIitem\fR ?\fIcolumn\fR? ?\fIvalue\fR?
599 With one argument, returns a dictionary of column/value pairs
600 for the specified \fIitem\fR.
601 With two arguments, returns the current value of the specified \fIcolumn\fR.
602 With three arguments, sets the value of column \fIcolumn\fR
603 in item \fIitem\fR to the specified \fIvalue\fR.
604 See also \fBCOLUMN IDENTIFIERS\fR.
605 .TP
606 \fIpathname \fBstate\fR ?\fIstateSpec\fR?
607 Modify or query the widget state; see \fIttk::widget(n)\fR.
608 .TP
609 \fIpathName \fBtag \fIargs...\fR
610 .RS
611 .TP
612 \fIpathName \fBtag bind \fItagName \fR?\fIsequence\fR? ?\fIscript\fR?
613 Add a Tk binding script for the event sequence \fIsequence\fR 
614 to the tag \fItagName\fR.  When an X event is delivered to an item,
615 binding scripts for each of the item's \fB\-tags\fR are evaluated
616 in order as per \fIbindtags(n)\fR.
617 .RS
618 .PP
619 \fB<KeyPress>\fR, \fB<KeyRelease>\fR, and virtual events
620 are sent to the focus item.
621 \fB<ButtonPress>\fR, \fB<ButtonRelease>\fR, and \fB<Motion>\fR events
622 are sent to the item under the mouse pointer.  
623 No other event types are supported.
624 .PP
625 The binding \fIscript\fR undergoes \fB%\fR-substitutions before 
626 evaluation; see \fBbind(n)\fR for details.
627 .RE
628 .TP
629 \fIpathName \fBtag configure \fItagName\fR ?\fIoption\fR? ?\fIvalue option value...\fR?
630 Query or modify the options for the specified \fItagName\fR.
631 If one or more \fIoption/value\fR pairs are specified,
632 sets the value of those options for the specified tag.
633 If a single \fIoption\fR is specified, 
634 returns the value of that option 
635 (or the empty string if the option has not been specified for \fItagName\fR).
636 With no additional arguments, 
637 returns a dictionary of the option settings for \fItagName\fR.
638 See \fBTAG OPTIONS\fR for the list of available options.
639 .TP
640 \fIpathName \fBtag has \fItagName\fR ?\fIitem\fR?
641 If \fIitem\fR is specified, returns 1 or 0
642 depending on whether the specified item has the named tag.
643 Otherwise, returns a list of all items which have
644 the specified tag.
645 .TP
646 \fIpathName \fBtag names\fR
647 Returns a list of all tags used by the widget.
648 .TP
649 \fIpathName \fBtag add \fItag items\fR
650 Adds the specified \fItag\fR to each of the listed \fIitems\fR.
651 If \fItag\fR is already present for a particular item,
652 then the \fB\-tags\fR for that item are unchanged.
653 .TP
654 \fIpathName \fBtag remove \fItag\fR ?\fIitems\fR?
655 Removes the specified \fItag\fR from each of the listed \fIitems\fR.
656 If \fIitems\fR is omitted, removes \fItag\fR from each item in the tree.
657 If \fItag\fR is not present for a particular item,
658 then the \fB\-tags\fR for that item are unchanged.
659 .RE
660 .TP
661 \fIpathName \fBxview \fIargs\fR
662 Standard command for horizontal scrolling; see \fIwidget(n)\fR.
663 .TP
664 \fIpathName \fByview \fIargs\fR
665 Standard command for vertical scrolling; see \fIttk::widget(n)\fR.
666 .SH "ITEM OPTIONS"
667 .PP
668 The following item options may be specified for items
669 in the \fBinsert\fR and \fBitem\fR widget commands.
670 .OP \-text text Text
671 The textual label to display for the item.
672 .OP \-image image Image
673 A Tk image, displayed to the left of the label.
674 .OP \-values values Values
675 The list of values associated with the item.
676 .RS
677 .PP
678 Each item should have the same number of values as
679 the \fB\-columns\fR widget option.
680 If there are fewer values than columns,
681 the remaining values are assumed empty.
682 If there are more values than columns,
683 the extra values are ignored.
684 .RE
685 .OP \-open open Open
686 A boolean value indicating whether the item's children
687 should be displayed (\fB\-open true\fR) or hidden (\fB\-open false\fR).
688 .OP \-tags tags Tags
689 A list of tags associated with this item.  
690 .SH "TAG OPTIONS"
691 .PP
692 The following options may be specified on tags:
693 .IP \fB\-foreground\fR
694 Specifies the text foreground color.
695 .IP \fB\-background\fR
696 Specifies the cell or item background color.
697 .IP \fB\-font\fR
698 Specifies the font to use when drawing text.
699 .\" ??? Maybe: .IP \-anchor
700 .\" ??? Maybe: .IP \-padding
701 .\" ??? Maybe: .IP \-text
702 .IP \fB\-image\fR
703 Specifies the item image, in case the item's \fB\-image\fR option is empty.
704 .\" .PP
705 .\" \fI(@@@ TODO: sort out order of precedence for options)\fR
706 .SH "COLUMN IDENTIFIERS"
707 .PP
708 Column identifiers take any of the following forms:
709 .IP \(bu
710 A symbolic name from the list of \fB\-columns\fR.
711 .IP \(bu
712 An integer \fIn\fR, specifying the \fIn\fRth data column.
713 .IP \(bu
714 A string of the form \fB#\fIn\fR, where \fIn\fR is an integer,
715 specifying the \fIn\fRth display column.
716 .PP
717 \fBNOTE:\fR 
718 Item \fB\-values\fR may be displayed in a different order than 
719 the order in which they are stored.
720 .PP
721 \fBNOTE:\fR Column #0 always refers to the tree column,
722 even if \fB\-show tree\fR is not specified.
723 .PP
724 A \fIdata column number\fR is an index into an item's \fB\-values\fR list;
725 a \fIdisplay column number\fR is the column number in the tree
726 where the values are displayed.  
727 Tree labels are displayed in column #0.
728 If \fB\-displaycolumns\fR is not set,
729 then data column \fIn\fR is displayed in display column \fB#\fIn+1\fR.
730 Again, \fBcolumn #0 always refers to the tree column\fR.
731 .SH "VIRTUAL EVENTS"
732 .PP
733 The treeview widget generates the following virtual events.
734 .IP <<TreeviewSelect>>
735 Generated whenever the selection changes.
736 .IP <<TreeviewOpen>>
737 Generated just before setting the focus item to \fB\-open true\fR.
738 .IP <<TreeviewClose>>
739 Generated just after setting the focus item to \fB\-open false\fR.
740 .PP
741 The \fBfocus\fR and \fBselection\fR widget commands can be used
742 to determine the affected item or items.
743 '\" Not yet:
744 '\" In Tk 8.5, the affected item is also passed as the \fB\-detail\fR field
745 '\" of the virtual event.
746 .SH "SEE ALSO"
747 ttk::widget(n), listbox(n), image(n), bind(n)
748 '\" Local Variables:
749 '\" mode: nroff
750 '\" End: