1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634
|
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>Tile package reference: treeview</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.12 $">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid8206658">NAME</a> <a href="#SECTid82066d0">SYNOPSIS</a> <a href="#SECTid8206798">DESCRIPTION</a> <a href="#SECTid82069c8">STANDARD OPTIONS</a> <a href="#SECTid8206b30">WIDGET OPTIONS</a> <a href="#SECTid82074e0">WIDGET COMMAND</a> <a href="#SECTid81eb7f0">ITEM OPTIONS</a> <a href="#SECTid81ebd68">TAG OPTIONS</a> <a href="#SECTid81ec060">COLUMN IDENTIFIERS</a> <a href="#SECTid81ec4e8">VIRTUAL EVENTS</a> <a href="#SECTid81ec7e0">SEE ALSO</a>
</div><hr class="navsep">
</div><div class="body">
<h2><a name="SECTid8206658">NAME</a></h2><p class="namesection">
<b class="names">ttk::treeview - </b><br>hierarchical multicolumn data display widget</p>
<h2><a name="SECTid82066d0">SYNOPSIS</a></h2><pre class="syntax">
<b>ttk::treeview</b> <i class="m">pathname</i> ?<i class="m">options</i>?
</pre>
<h2><a name="SECTid8206798">DESCRIPTION</a></h2><p>The treeview widget displays a hierarchical collection of items.
Each item has a textual label, an optional image,
and an optional list of data values.
The data values are displayed in successive columns after
the tree label.
</p><p>The order in which data values are displayed may be controlled
by setting the <b>-displaycolumns</b> widget option.
The tree widget can also display column headings.
Columns may be accessed by number or by symbolic names
listed in the <b>-columns</b> widget option;
see <a href="#SECTid81ec060">COLUMN IDENTIFIERS</a>.
</p><p>Each item is identified by a unique name.
The widget will generate item IDs if they are not supplied by the caller.
There is a distinguished root item, named <b>{}</b>.
The root item itself is not displayed;
its children appear at the top level of the hierarchy.
</p><p>Each item also has a list of <i>tags</i>,
which can be used to associate event bindings with individual items
and control the appearance of the item.
</p><p>Treeview widgets support horizontal and vertical scrolling with the
standard <b>-[xy]scrollcommand</b> options
and <b>[xy]view</b> widget commands.
</p>
<h2><a name="SECTid82069c8">STANDARD OPTIONS</a></h2><div class="menu"><table class="menu" width="100%">
<tr>
<td width="25%"><a href="widget.html#stdopt_-class">-class</a></td><td width="25%"><a href="widget.html#stdopt_-cursor">-cursor</a></td><td width="25%"><a href="widget.html#stdopt_-style">-style</a></td><td width="25%"><a href="widget.html#stdopt_-takefocus">-takefocus</a></td>
</tr><tr>
<td width="25%"><a href="widget.html#stdopt_-xscrollcommand">-xscrollcommand</a></td><td width="25%"><a href="widget.html#stdopt_-yscrollcommand">-yscrollcommand</a></td>
</tr>
</table></div>
<h2><a name="SECTid8206b30">WIDGET OPTIONS</a></h2><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="option_-columns">-columns</a></td><td width="40%" align="left">columns</td><td width="40%" align="left">Columns</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">A list of column identifiers,
specifying the number of columns and their names.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-displaycolumns">-displaycolumns</a></td><td width="40%" align="left">displayColumns</td><td width="40%" align="left">DisplayColumns</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">A list of column identifiers
(either symbolic names or integer indices)
specifying which data columns are displayed
and the order in which they appear,
or the string <b>#all</b>.
<br>If set to <b>#all</b> (the default), all columns are shown in the order given.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-height">-height</a></td><td width="40%" align="left">height</td><td width="40%" align="left">Height</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">Specifies the number of rows which should be visible.
Note:
the requested width is determined from the sum of the column widths.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-padding">-padding</a></td><td width="40%" align="left">padding</td><td width="40%" align="left">Padding</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">Specifies the internal padding for the widget.
The padding is a list of up to four length specifications;
see <b>Ttk_GetPaddingFromObj()</b> for details.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-selectmode">-selectmode</a></td><td width="40%" align="left">selectMode</td><td width="40%" align="left">SelectMode</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">Controls how the built-in class bindings manage the selection.
One of <b>extended</b>, <b>browse</b>, or <b>none</b>.
<br>If set to <b>extended</b> (the default), multiple items may be selected.
If <b>browse</b>, only a single item will be selected at a time.
If <b>none</b>, the selection will not be changed.
<br>Note that application code and tag bindings can set the selection
however they wish, regardless of the value of <b>-selectmode</b>.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-show">-show</a></td><td width="40%" align="left">show</td><td width="40%" align="left">Show</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">A list containing zero or more of the following values, specifying
which elements of the tree to display.
<dl>
<dt><b>tree</b></dt>
<dd>Display tree labels in column #0.
</dd>
<dt><b>headings</b></dt>
<dd>Display the heading row.
</dd>
</dl><p>The default is <b>tree headings</b>, i.e., show all elements.
</p><p>
<b>NOTE:</b> Column #0 always refers to the tree column,
even if <b>-show tree</b> is not specified.
</p>
</td>
</tr>
</table></div>
<h2><a name="SECTid82074e0">WIDGET COMMAND</a></h2><dl>
<dt>
<i class="m">pathname</i> <b>bbox</b> <i class="m">item</i> ?<i class="m">column</i>?</dt>
<dd>Returns the bounding box (relative to the treeview widget's window)
of the specified <i>item</i>
in the form <i>x y width height</i>.
If <i>column</i> is specified, returns the bounding box of that cell.
If the <i>item</i> is not visible
(i.e., if it is a descendant of a closed item or is scrolled offscreen),
returns the empty list.
</dd>
<dt>
<i class="m">pathname</i> <b>cget</b> <i class="m">option</i>
</dt>
<dd>Returns the current value of the specified <i>option</i>; see <i>widget(n)</i>.
</dd>
<dt>
<i class="m">pathname</i> <b>children</b> <i class="m">item</i> ?<i class="m">newchildren</i>?</dt>
<dd>If <i>newchildren</i> is not specified,
returns the list of children belonging to <i>item</i>.
<p>If <i>newchildren</i> is specified, replaces <i>item</i>'s child list
with <i>newchildren</i>.
Items in the old child list not present in the new child list
are detached from the tree.
None of the items in <i>newchildren</i> may be an ancestor
of <i>item</i>.
</p>
</dd>
<dt>
<i class="m">pathname</i> <b>column</b> <i class="m">column</i> ?<i class="m">-option</i> ?<i class="m">value -option value...</i>?</dt>
<dd>Query or modify the options for the specified <i>column</i>.
If no <i>-option</i> is specified,
returns a dictionary of option/value pairs.
If a single <i>-option</i> is specified,
returns the value of that option.
Otherwise, the options are updated with the specified values.
The following options may be set on each column:
<dl>
<dt>
<b>-id</b> <i class="m">name</i>
</dt>
<dd>The column name. This is a read-only option.
For example, [<i>$pathname</i> <b>column #</b><i>n</i> <b>-id</b>]
returns the data column associated with display column #<i>n</i>.
</dd>
<dt><b>-anchor</b></dt>
<dd>Specifies how the text in this column should be aligned
with respect to the cell. One of
<b>n</b>, <b>ne</b>, <b>e</b>, <b>se</b>,
<b>s</b>, <b>sw</b>, <b>w</b>, <b>nw</b>, or <b>center</b>.
</dd>
<dt><b>-minwidth</b></dt>
<dd>The minimum width of the column in pixels.
The treeview widget will not make the column any smaller than
<b>-minwidth</b> when the widget is resized or the user drags a
column separator.
</dd>
<dt><b>-stretch</b></dt>
<dd>Specifies whether or not the column's width should be adjusted
when the widget is resized.
</dd>
<dt>
<b>-width</b> <i class="m">w</i>
</dt>
<dd>The width of the column in pixels. Default is something reasonable,
probably 200 or so.
</dd>
</dl><p>Use <i>pathname column #0</i> to configure the tree column.
</p>
</dd>
<dt>
<i class="m">pathname</i> <b>configure</b> ?<i class="m">option</i>? ?<i class="m">value option value ...</i>?</dt>
<dd>Modify or query widget options; see <i>widget(n)</i>.
</dd>
<dt>
<i class="m">pathname</i> <b>delete</b> <i class="m">itemList</i>
</dt>
<dd>Deletes each of the items in <i>itemList</i> and all of their descendants.
The root item may not be deleted.
See also: <b>detach</b>.
</dd>
<dt>
<i class="m">pathname</i> <b>detach</b> <i class="m">itemList</i>
</dt>
<dd>Unlinks all of the specified items in <i>itemList</i> from the tree.
The items and all of their descendants are still present
and may be reinserted at another point in the tree
but will not be displayed.
The root item may not be detached.
See also: <b>delete</b>.
</dd>
<dt>
<i class="m">pathname</i> <b>exists</b> <i class="m">item</i>
</dt>
<dd>Returns 1 if the specified <i>item</i> is present in the tree,
0 otherwise.
</dd>
<dt>
<i class="m">pathname</i> <b>focus</b> ?<i class="m">item</i>?</dt>
<dd>If <i>item</i> is specified, sets the focus item to <i>item</i>.
Otherwise, returns the current focus item, or <b>{}</b> if there is none.
</dd>
<dt>
<i class="m">pathname</i> <b>heading</b> <i class="m">column</i> ?<i class="m">-option</i> ?<i class="m">value -option value...</i>?</dt>
<dd>Query or modify the heading options for the specified <i>column</i>.
Valid options are:
<dl>
<dt>
<b>-text</b> <i class="m">text</i>
</dt>
<dd>The text to display in the column heading.
</dd>
<dt>
<b>-image</b> <i class="m">imageName</i>
</dt>
<dd>Specifies an image to display to the right of the column heading.
</dd>
<dt>
<b>-anchor</b> <i class="m">anchor</i>
</dt>
<dd>Specifies how the heading text should be aligned.
One of the standard Tk anchor values.
</dd>
<dt>
<b>-command</b> <i class="m">script</i>
</dt>
<dd>A script to evaluate when the heading label is pressed.
</dd>
</dl><p>Use <i>pathname heading #0</i> to configure the tree column heading.
</p>
</dd>
<dt>
<i class="m">pathname</i> <b>identify</b> <i class="m">component x y</i>
</dt>
<dd>Returns a description of the specified <i>component</i>
under the point given by <i>x</i> and <i>y</i>,
or the empty string if no such <i>component</i> is present at that position.
The following subcommands are supported:
<dl class="commandlist">
<dt>
<i class="m">pathname</i> <b>identify row</b> <i class="m">x y</i>
</dt>
<dd>Returns the item ID of the item at position <i>y</i>.
</dd>
<dt>
<i class="m">pathname</i> <b>identify column</b> <i class="m">x y</i>
</dt>
<dd>Returns the data column identifier of the cell at position <i>x</i>.
The tree column has ID <b>#0</b>.
</dd>
</dl><p>See <a href="#SECTid81ec060">COLUMN IDENTIFIERS</a> for a discussion of display columns
and data columns.
</p>
</dd>
<dt>
<i class="m">pathname</i> <b>index</b> <i class="m">item</i>
</dt>
<dd>Returns the integer index of <i>item</i> within its parent's list of children.
</dd>
<dt>
<i class="m">pathname</i> <b>insert</b> <i class="m">parent</i> <i class="m">index</i> ?<b>-id</b> <i class="m">id</i>? <i class="m">options...</i>
</dt>
<dd>Creates a new item.
<i>parent</i> is the item ID of the parent item,
or the empty string <b>{}</b>
to create a new top-level item.
<i>index</i> is an integer, or the value <b>end</b>, specifying where in the
list of <i>parent</i>'s children to insert the new item.
If <i>index</i> is less than or equal to zero,
the new node is inserted at the beginning;
if <i>index</i> is greater than or equal to the current number of children,
it is inserted at the end.
If <b>-id</b> is specified, it is used as the item identifier;
<i>id</i> must not already exist in the tree.
Otherwise, a new unique identifier is generated.
<p>
<i>pathname</i> <b>insert</b> returns the item identifier of the
newly created item.
See <a href="#SECTid81eb7f0">ITEM OPTIONS</a> for the list of available options.
</p>
</dd>
<dt>
<i class="m">pathname</i> <b>instate</b> <i class="m">statespec</i> ?<i class="m">script</i>?</dt>
<dd>Test the widget state; see <i>widget(n)</i>.
</dd>
<dt>
<i class="m">pathname</i> <b>item</b> <i class="m">item</i> ?<i class="m">-option</i> ?<i class="m">value -option value...</i>?</dt>
<dd>Query or modify the options for the specified <i>item</i>.
If no <i>-option</i> is specified,
returns a dictionary of option/value pairs.
If a single <i>-option</i> is specified,
returns the value of that option.
Otherwise, the item's options are updated with the specified values.
See <a href="#SECTid81eb7f0">ITEM OPTIONS</a> for the list of available options.
</dd>
<dt>
<i class="m">pathname</i> <b>move</b> <i class="m">item parent index</i>
</dt>
<dd>Moves <i>item</i> to position <i>index</i> in <i>parent</i>'s list of children.
It is illegal to move an item under one of its descendants.
<p>If <i>index</i> is less than or equal to zero, <i>item</i> is moved
to the beginning; if greater than or equal to the number of children,
it's moved to the end.
</p>
</dd>
<dt>
<i class="m">pathname</i> <b>next</b> <i class="m">item</i>
</dt>
<dd>Returns the identifier of <i>item</i>'s next sibling,
or <b>{}</b> if <i>item</i> is the last child of its parent.
</dd>
<dt>
<i class="m">pathname</i> <b>parent</b> <i class="m">item</i>
</dt>
<dd>Returns the ID of the parent of <i>item</i>,
or <b>{}</b> if <i>item</i> is at the top level of the hierarchy.
</dd>
<dt>
<i class="m">pathname</i> <b>prev</b> <i class="m">item</i>
</dt>
<dd>Returns the identifier of <i>item</i>'s previous sibling,
or <b>{}</b> if <i>item</i> is the first child of its parent.
</dd>
<dt>
<i class="m">pathname</i> <b>see</b> <i class="m">item</i>
</dt>
<dd>Ensure that <i>item</i> is visible:
sets all of <i>item</i>'s ancestors to <b>-open true</b>,
and scrolls the widget if necessary so that <i>item</i> is
within the visible portion of the tree.
</dd>
<dt>
<i class="m">pathname</i> <b>selection</b> ?<i class="m">selop</i> <i class="m">itemList</i>?</dt>
<dd>If <i>selop</i> is not specified, returns the list of selected items.
Otherwise, <i>selop</i> is one of the following:
<dl class="commandlist">
<dt>
<i class="m">pathname</i> <b>selection set</b> <i class="m">itemList</i>
</dt>
<dd>
<i>itemList</i> becomes the new selection.
</dd>
<dt>
<i class="m">pathname</i> <b>selection add</b> <i class="m">itemList</i>
</dt>
<dd>Add <i>itemList</i> to the selection
</dd>
<dt>
<i class="m">pathname</i> <b>selection remove</b> <i class="m">itemList</i>
</dt>
<dd>Remove <i>itemList</i> from the selection
</dd>
<dt>
<i class="m">pathname</i> <b>selection toggle</b> <i class="m">itemList</i>
</dt>
<dd>Toggle the selection state of each item in <i>itemList</i>.
</dd>
</dl>
</dd>
<dt>
<i class="m">pathname</i> <b>set</b> <i class="m">item</i> ?<i class="m">column</i> ?<i class="m">value</i>??</dt>
<dd>With one argument, returns a dictionary of column/value pairs
for the specified <i>item</i>.
With two arguments, returns the current value of the specified <i>column</i>.
With three arguments, sets the value of column <i>column</i>
in item <i>item</i> to the specified <i>value</i>.
See also <a href="#SECTid81ec060">COLUMN IDENTIFIERS</a>.
</dd>
<dt>
<i class="m">pathname</i> <b>state</b> ?<i class="m">stateSpec</i>?</dt>
<dd>Modify or query the widget state; see <i>widget(n)</i>.
</dd>
<dt>
<i class="m">pathName</i> <b>tag</b> <i class="m">args...</i>
</dt>
<dd><dl>
<dt>
<i class="m">pathName</i> <b>tag bind</b> <i class="m">tagName</i> ?<i class="m">sequence</i> ?<i class="m">script</i>??</dt>
<dd>Add a Tk binding script for the event sequence <i>sequence</i>
to the tag <i>tagName</i>. When an X event is delivered to an item,
binding scripts for each of the item's <b>-tags</b> are evaluated
in order as per <i>bindtags(n)</i>.
<p>
<b><KeyPress></b>, <b><KeyRelease></b>, and virtual events
are sent to the focus item.
<b><ButtonPress></b>, <b><ButtonRelease></b>, and <b><Motion></b> events
are sent to the item under the mouse pointer.
No other event types are supported.
</p><p>The binding <i>script</i> undergoes <b>%</b>-substitutions before
evaluation; see <b>bind(n)</b> for details.
</p>
</dd>
<dt>
<i class="m">pathName</i> <b>tag configure</b> <i class="m">tagName</i> ?<i class="m">option</i>? ?<i class="m">value option value...</i>?</dt>
<dd>Query or modify the options for the specified <i>tagName</i>.
If one or more <i>option/value</i> pairs are specified,
sets the value of those options for the specified tag.
If a single <i>option</i> is specified,
returns the value of that option
(or the empty string if the option has not been specified for <i>tagName</i>).
With no additional arguments,
returns a dictionary of the option settings for <i>tagName</i>.
See <a href="#SECTid81ebd68">TAG OPTIONS</a> for the list of available options.
</dd>
</dl></dd>
<dt>
<i class="m">pathName</i> <b>xview</b> <i class="m">args</i>
</dt>
<dd>Standard command for horizontal scrolling; see <i>widget(n)</i>.
</dd>
<dt>
<i class="m">pathName</i> <b>yview</b> <i class="m">args</i>
</dt>
<dd>Standard command for vertical scrolling; see <i>widget(n)</i>.
</dd>
</dl>
<h2><a name="SECTid81eb7f0">ITEM OPTIONS</a></h2><p>The following item options may be specified for items
in the <b>insert</b> and <b>item</b> widget commands.
</p><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="option_-text">-text</a></td><td width="40%" align="left">text</td><td width="40%" align="left">Text</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">The textual label to display for the item.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-image">-image</a></td><td width="40%" align="left">image</td><td width="40%" align="left">Image</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">A Tk image, displayed to the left of the label.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-values">-values</a></td><td width="40%" align="left">values</td><td width="40%" align="left">Values</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">The list of values associated with the item.
<br>Each item should have the same number of values as
the <b>-columns</b> widget option.
If there are fewer values than columns,
the remaining values are assumed empty.
If there are more values than columns,
the extra values are ignored.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-open">-open</a></td><td width="40%" align="left">open</td><td width="40%" align="left">Open</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">A boolean value indicating whether the item's children
should be displayed (<b>-open true</b>) or hidden (<b>-open false</b>).
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-tags">-tags</a></td><td width="40%" align="left">tags</td><td width="40%" align="left">Tags</td>
</tr><tr class="desc">
<td class="padding" width="20%"></td><td class="argdesc" width="80%" align="left" colspan="2">A list of tags associated with this item.
</td>
</tr>
</table></div>
<h2><a name="SECTid81ebd68">TAG OPTIONS</a></h2><p>The following options may be specified on tags:
</p><dl>
<dt>-foreground</dt>
<dd>Specifies the text foreground color.
</dd>
<dt>-background</dt>
<dd>Specifies the cell or item background color.
</dd>
<dt>-font</dt>
<dd>Specifies the font to use when drawing text.
</dd>
<dt>-image</dt>
<dd>Specifies the item image, in case the item's <b>-image</b> option is empty.
</dd>
</dl><p>
<i>(@@@ TODO: sort out order of precedence for options)</i>
</p>
<h2><a name="SECTid81ec060">COLUMN IDENTIFIERS</a></h2><p>Column identifiers take any of the following forms:
</p><ul>
<li>A symbolic name from the list of <b>-columns</b>.
</li>
<li>An integer <i>n</i>, specifying the <i>n</i>th data column.
</li>
<li>A string of the form <b>#</b><i>n</i>, where <i>n</i> is an integer,
specifying the <i>n</i>th display column.
</li>
</ul><p>
<b>NOTE:</b>
Item <b>-values</b> may be displayed in a different order than
the order in which they are stored.
</p><p>
<b>NOTE:</b> Column #0 always refers to the tree column,
even if <b>-show tree</b> is not specified.
</p><p>A <i>data column number</i> is an index into an item's <b>-values</b> list;
a <i>display column number</i> is the column number in the tree
where the values are displayed.
Tree labels are displayed in column #0.
If <b>-displaycolumns</b> is not set,
then data column <i>n</i> is displayed in display column <b>#</b><i>n+1</i>.
Again, <b>column #0 always refers to the tree column</b>.
</p>
<h2><a name="SECTid81ec4e8">VIRTUAL EVENTS</a></h2><p>The treeview widget generates the following virtual events.
</p><dl>
<dt><<TreeviewSelect>></dt>
<dd>Generated whenever the selection changes.
</dd>
<dt><<TreeviewOpen>></dt>
<dd>Generated just before setting the focus item to <b>-open true</b>.
</dd>
<dt><<TreeviewClose>></dt>
<dd>Generated just after setting the focus item to <b>-open false</b>.
</dd>
</dl><p>The <b class="cmd">focus</b> and <b class="cmd">selection</b> widget commands can be used
to determine the affected item or items.
In Tk 8.5, the affected item is also passed as the <b>-detail</b> field
of the virtual event.
</p>
<h2><a name="SECTid81ec7e0">SEE ALSO</a></h2><p class="seealso">widget(n), listbox(n), <a href="image.html">image(n)</a>, bind(n)</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> <a class="navaid" href="category-index.html">Index</a> <a class="navaid" href="keyword-index.html">Keywords</a>
</div>
</body>
</html>
|