/usr/share/doc/python-tktreectrl-doc/Treectrl.html is in python-tktreectrl-doc 2.0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 | <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module Treectrl</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Treectrl</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href="./TkTreectrl.html">index</a><br><a href="file:./TkTreectrl/Treectrl.py">./TkTreectrl/Treectrl.py</a></font></td></tr></table>
<p><tt>Wrapper module for the Tk treectrl widget.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Tkinter.html">Tkinter</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="Tkinter.html#Widget">Tkinter.Widget</a>(<a href="Tkinter.html#BaseWidget">Tkinter.BaseWidget</a>, <a href="Tkinter.html#Pack">Tkinter.Pack</a>, <a href="Tkinter.html#Place">Tkinter.Place</a>, <a href="Tkinter.html#Grid">Tkinter.Grid</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="Treectrl.html#Treectrl">Treectrl</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="Treectrl.html#TreectrlEvent">TreectrlEvent</a>
</font></dt></dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Treectrl">class <strong>Treectrl</strong></a>(<a href="Tkinter.html#Widget">Tkinter.Widget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A treectrl is a widget which displays items in a one- or two-dimensional<br>
arrangement. Items have a parent-child relationship with other items. Items<br>
have a set of states, which are boolean properties. Items may be spread<br>
about one or more columns. For each column of an item there is a style<br>
associated, which determines how to display the item's column taking into<br>
account the item's current state set. One column can be defined to display<br>
the data in a hierarchical structure.<br>
Normally the origin of the coordinate system is at the upper-left corner of<br>
the window containing the treectrl. It is possible to adjust the origin of<br>
the coordinate system relative to the origin of the window using the<br>
<a href="#Treectrl-xview">xview</a>() and <a href="#Treectrl-yview">yview</a>() widget commands; this is typically used for scrolling.<br>
A treectrl widget can be horizontal or vertical oriented like many other Tk<br>
widgets. For displaying hierarchical data only vertical orientation is<br>
useful, since only then the children of an item are displayed directly<br>
below their parent. If the treectrl widget is used only to display data in<br>
a multicolumn listbox, the specification of an orientation will give useful<br>
results.<br>
<br>
STANDARD OPTIONS<br>
-background<br>
-borderwidth<br>
-cursor<br>
-font<br>
-highlightbackground<br>
-highlightcolor<br>
-highlightthickness<br>
-orient<br>
-relief<br>
-takefocus<br>
-xscrollcommand<br>
-yscrollcommand<br>
-foreground<br>
<br>
WIDGET SPECIFIC OPTIONS<br>
-backgroundimage<br>
Specifies the name of an image to draw as the list background. The<br>
image is tiled horizontally and vertically to fill the content area of<br>
the list. If the image is transparent it is drawn on top of the<br>
background color(s).<br>
-backgroundmode<br>
Specifies how the background color of items is chosen in each column.<br>
The value should be one of row, column, order, or ordervisible. The<br>
default is row. This option has only an effect for columns which have<br>
-itembackground defined as list of two or more colors (see section<br>
COLUMNS below for more on this). If row or column is specified, the<br>
background color is chosen based on the location of the item in the<br>
1- or 2-dimensional grid of items as layed out on the screen; this<br>
layout of items is affected by the -orient and -wrap options as well as<br>
item visibility. When order or ordervisible is specified, the<br>
background color is chosen based on the result of the item order<br>
command, regardless of the layout of items.<br>
-bgimage<br>
Synonym for -backgroundimage (since 2.3)<br>
-bgimageanchor<br>
Controls the alignment of the -backgroundimage. The value is a<br>
standard Tk anchor position such as "nw", "se" or "center", etc.<br>
The image is aligned to the content area when the image doesn't scroll,<br>
otherwise the image is aligned to the canvas. The default is "nw".<br>
-bgimageopaque<br>
A boolean that indicates whether or not the -backgroundimage is<br>
partially transparent. This is needed because there is no way to tell<br>
in Tk whether an image contains transparency. The default is True, so<br>
if you use a transparent -backgroundimage you must set this to False.<br>
-bgimagescroll<br>
Controls whether the -backgroundimage scrolls along with the items or<br>
remains locked in place. The value can be an emptry string for no<br>
scrolling, "x" for horizontal scrolling only, "y" for vertical<br>
scrolling only, or "xy" (the default) for scrolling in both directions.<br>
-bgimagetile<br>
Controls whether the -backgroundimage is tiled along the x and y axes.<br>
The value can be "", "x", "y" or "xy" (the default).<br>
-buttonbitmap<br>
Specifies the bitmap to be used as the expand/collapse button to the<br>
left of an item. This is a per-state option. If a bitmap is specified<br>
for a certain item state, it overrides the effects of -usetheme.<br>
-buttoncolor<br>
Specifies the foreground color which should be used for drawing the<br>
outline and the plus or minus sign of the button to the left of an<br>
item.<br>
-buttonimage<br>
Specifies the image to be used as the expand/collapse button to the<br>
left of an item. This is a per-state option. If an image is specified<br>
for a certain item state, it overrides the effects of -buttonbitmap and<br>
-usetheme.<br>
-buttonsize<br>
Specifies the width and height of the button drawn to the left of an<br>
item in any of the forms acceptable to Tk_GetPixels.<br>
-buttonthickness<br>
Specifies the width of the outline and the plus or minus sign of the<br>
button to the left of an item in any of the forms acceptable to<br>
Tk_GetPixels.<br>
-buttontracking<br>
On Mac OS X and Gtk+ the expand/collapse buttons don't toggle when they<br>
are clicked, only when the mouse button is released over them, like<br>
regular pushbuttons. The value of this option is a boolean; when True<br>
the buttons toggle when the mouse button is released, when False the<br>
buttons toggle when clicked. The default is True on Mac OS X and<br>
Gtk+, False on Win32 and X11.<br>
-canvaspadx<br>
-canvaspady<br>
These options allow whitespace margins around the edges of the canvas.<br>
This is useful for 2D views where you don't want the items to butt<br>
against the window borders. The value of each option is a list of one<br>
or two screen distances specifying the width of the left/right margins<br>
and the height of the top/bottom margins respectively.<br>
-columnprefix<br>
Specifies an ascii string that changes the way column ids are reported<br>
and processed. If this option is a non-empty string, the usual integer<br>
value of a column id is prefixed with the given string. This can aid<br>
debugging but it is important your code doesn't assume column ids are<br>
integers if you use it.<br>
-columnproxy<br>
If this option specifies a non empty value, it should be a screen<br>
distance in any of the forms acceptable to Tk_GetPixels. Then a 1 pixel<br>
thick vertical line will be drawn at the specified screen distance from<br>
the left edge of the treectrl widget, which reaches from top to bottom<br>
of the treectrl widget and uses an inverting color (i.e black on<br>
lighter background, white on darker background). This line can be used<br>
to give the user a visual feedback during column resizing.<br>
-columnresizemode<br>
Specifies the visual feedback used when resizing columns. The value<br>
should be one of proxy or realtime. For proxy, a 1-pixel thick vertical<br>
line is drawn representing where the right edge of the column will be<br>
after resizing. For realtime, the column's size is changed while the<br>
user is dragging the right edge of the column.<br>
Since treectrl-2.3 the default value is "realtime",<br>
in earlier versions it used to be "proxy".<br>
-columntagexpr<br>
Specifies a boolean that enables or disables tag expressions in column<br>
descriptions.<br>
When the value of this option is False the characters (', ')', '&',<br>
'|', '^' and '!' have no special significance when using tags in column<br>
descriptions. This is useful for applications which may have arbitrary<br>
tags applied to columns or items.<br>
-defaultstyle<br>
Specifies a list of styles, one per column, to apply to each item<br>
created by the item create command. The number of styles in the list<br>
can be different from the number of tree columns. Each list element<br>
should be a valid style name or an empty string to indicate no style<br>
should be applied to a specific column. The list of styles is updated<br>
if a style is deleted or if a column is moved.<br>
This option is deprecated since treectrl-2.2, use<br>
<a href="#Treectrl-column_configure">column_configure</a>(itemstyle=...) instead.<br>
-doublebuffer<br>
Specifies if double-buffering should be used to improve displaying. The<br>
value should be one of none, window, or item. For none no<br>
double-buffering is used at all, which may be most memory efficient,<br>
but will probably generate some flickering on the screen. For window<br>
the complete tree is double-buffered, which requires a buffer big<br>
enough to contain the complete widget. For item, which is the default,<br>
every item is separately double-buffered, so it works with a buffer<br>
size as big as the biggest item.<br>
This option has no effect since tktreectrl-2.2.10 .<br>
-headerfont<br>
This is the font used for drawing text in column headers. The default<br>
value is TkHeadingFont where that font is defined (usually on Tk 8.5+),<br>
otherwise it is the default listbox font. On Mac OS X, TkHeadingFont<br>
is the small system font used for drawing text in the fixed-height<br>
headers. This new option results in a different default look to column<br>
text on X11, where TkHeadingFont is a bold font.<br>
-headerfg<br>
-headerforeground<br>
The foreground text color used when drawing text in column headers.<br>
On Gtk+, the system theme may override this color.<br>
-height<br>
Specifies the desired height for the window in any of the forms<br>
acceptable to Tk_GetPixels. The default is 200 pixels. If this option<br>
is less than or equal to zero then the window will not request any<br>
size at all.<br>
-indent<br>
Specifies the amount of indentation in any of the forms acceptable to<br>
Tk_GetPixels. The default is 19 pixel. Indentation is the screen<br>
distance an item is displayed more to the right than its father.<br>
-itemgapx<br>
-itemgapy<br>
These options allow whitespace gaps between adjacent items. This is<br>
useful for 2D views such as an icon view in a file browser or an image<br>
thumbnail list. The value of each option is a screen distance<br>
defaulting to zero.<br>
-itemheight<br>
Specifies a fixed height for every item in any of the forms acceptable<br>
to Tk_GetPixels. If non-zero, this option overrides the requested<br>
height of an item and the -minitemheight option. The default is 0,<br>
which means that every item has the height requested by the<br>
arrangement of elements in each column. Items are never shorter than<br>
the maximum height of a button.<br>
-itemprefix<br>
Specifies an ascii string that changes the way item ids are reported<br>
and processed. If this option is a non-empty string, the usual integer<br>
value of an item id is prefixed with the given string. This can aid<br>
debugging but it is important your code doesn't assume item ids are<br>
integers if you use it.<br>
-itemtagexpr<br>
Specifies a boolean that enables or disables tag expressions in item<br>
descriptions.<br>
When the value of this option is False the characters (', ')', '&',<br>
'|', '^' and '!' have no special significance when using tags in item<br>
descriptions. This is useful for applications which may have arbitrary<br>
tags applied to columns or items.<br>
-itemwidth<br>
Specifies a fixed width for every item in any of the forms acceptable<br>
to Tk_GetPixels. If more than one column is visible, then this option<br>
has no effect. If the -orient option is vertical, and the -wrap<br>
option is unspecified, then this option has no effect (in that case<br>
all items are as wide as the column).<br>
-itemwidthequal<br>
Specifies a boolean that says whether all items should have the same<br>
width. If more than one column is visible, then this option has no<br>
effect. If the -orient option is vertical, and the -wrap option is<br>
unspecified, then this option has no effect (in that case all items are<br>
as wide as the column). If the -itemwidth option is specified, then<br>
this option has no effect.<br>
-itemwidthmultiple<br>
Specifies a screen distance that every item's width will be evenly<br>
divisible by in any of the forms acceptable to Tk_GetPixels. If more<br>
than one column is visible, then this option has no effect. If the<br>
-orient option is vertical, and the -wrap option is unspecified, then<br>
this option has no effect (in that case all items are as wide as the<br>
column).<br>
If the -itemwidth option is specified, then this option has no effect.<br>
-linecolor<br>
Specifies the color which should be used for drawing the connecting<br>
lines between related items.<br>
-linestyle<br>
Specifies the style of the connecting lines between related items,<br>
should be dot which is the default, or solid.<br>
-linethickness<br>
Specifies the thickness of the connecting lines between related items<br>
in any of the forms acceptable to Tk_GetPixels.<br>
-minitemheight<br>
Specifies a minimum height for every item in any of the forms<br>
acceptable to Tk_GetPixels. The default is 0, which means that every<br>
item has the height requested by the arrangement of elements in each<br>
column. This option has no effect if the -itemheight option is<br>
specified. Items are never shorter than the maximum height of a button.<br>
-scrollmargin<br>
The interpretation of this option is left to Tcl scripts that implement<br>
scrolling: the widget implementation ignores this option entirely.<br>
Defaults to 0.<br>
-selectmode<br>
Specifies one of several styles for manipulating the selection. The<br>
value of the option may be arbitrary, but the default bindings expect<br>
it to be either single, browse, multiple, or extended; the default<br>
value is browse.<br>
-showbuttons<br>
Specifies a boolean value that determines whether this widget displays<br>
a button to the left of any item. If the button is actually drawn can<br>
be configured for every item with the item hasbutton widget command,<br>
but if this option is set to false, the configuration of an item has<br>
no effect. The default value is True.<br>
-showheader<br>
Specifies a boolean value that determines whether this widget should<br>
display the header line with the column names at the top of the widget.<br>
The default value is True.<br>
-showlines<br>
Specifies a boolean value that determines whether this widget should<br>
draw the connecting lines between related items.<br>
In versions prior to trectrl-2.3 the default value was True. Since 2.3<br>
the default value is False on Mac OS X and Gtk+, True on Win32 and X11.<br>
-showroot<br>
Specifies a boolean value that determines whether this widget should<br>
draw the root item. By suppressing the drawing of the root item the<br>
widget can have multiple items that appear as toplevel items.<br>
The default value is True.<br>
-showrootbutton<br>
Specifies a boolean value that determines whether this widget should<br>
draw a button before the root item. The default value is False.<br>
-showrootchildbuttons<br>
Specifies a boolean value that determines whether this widget should<br>
draw the expand/collapse buttons next to children of the root item.<br>
The default value is True.<br>
-showrootlines<br>
Specifies a boolean value that determines whether this widget should<br>
draw the connecting lines between children of the root item.<br>
The default value is True.<br>
-treecolumn<br>
Specifies a column description that determines which column displays<br>
the buttons and lines. The default is unspecified.<br>
-usetheme<br>
Specifies a boolean value that determines whether this widget should<br>
draw parts of itself using a platform-specific theme manager.<br>
Since treectrl-2.3 the default value is now True, in earlier versions<br>
the default used to be False.<br>
-width<br>
Specifies the desired width for the window in any of the forms<br>
acceptable to Tk_GetPixels. The default is 200 pixels. If this option<br>
is less than or equal to zero then the window will not request any size<br>
at all.<br>
-wrap<br>
Specifies whether items are arranged in a 1- or 2-dimensional layout.<br>
If the value is an empty string (the default), then items are arranged<br>
from top to bottom (orient='vertical') or from left to right (orient=<br>
'horizontal') in a 1-dimensional layout. If the value is "N items",<br>
then no more than N items will appear in a vertical group<br>
(orient='vertical') or horizontal group (orient='horizontal').<br>
If the value is "N pixels", then no vertical group of items will be<br>
taller than N pixels (orient='vertical') or no horizontal group of<br>
items will be wider than N pixels (orient='horizontal').<br>
If the value is "window", then no vertical group of items will be<br>
taller than the window (orient='vertical') or no horizontal group of<br>
items will be wider than the window (orient='horizontal').<br>
-xscrolldelay<br>
Specifies the amount of time before the default binding should handle<br>
repeating mouse motion events in horizontal direction with button 1<br>
pressed. The value should be a sequence of 1 or 2 integers. The first<br>
integer specifies the timespan in microseconds before the active item<br>
should be changed to get nearer to the current mouse position.<br>
If there are two integers specified, the first is only used for the<br>
first motion event, any repeating motion events are handled after the<br>
seconds amount of miliseconds is elapsed.<br>
-xscrollincrement<br>
Specifies an increment for horizontal scrolling, in any of the usual<br>
forms permitted for screen distances. If the value of this option is<br>
greater than zero, the horizontal view in the window will be<br>
constrained so that the x coordinate at the left edge of the window<br>
is always an even multiple of -xscrollincrement; furthermore, the<br>
units for scrolling (e.g., the change in view when the left and right<br>
arrows of a scrollbar are selected) will also be -xscrollincrement.<br>
If the value of this option is less than or equal to zero, then<br>
horizontal scrolling is unconstrained.<br>
-xscrollsmoothing<br>
-yscrollsmoothing<br>
When these options are set to true and the xview or yview commands are<br>
called to scroll by "units", scrolling occurs according to the<br>
-xscrollincrement or -yscrollincrement options, and all other<br>
scrolling is done as if the -xscrollincrement or -yscrollincrement<br>
options were set to 1. The effect is that when dragging the scrollbar<br>
thumb scrolling is very smooth, but when clicking the scrollbar<br>
buttons scrolling is done in coarser increments.<br>
-yscrolldelay<br>
Specifies the amount of time before the default binding should handle<br>
repeating mouse motion events in vertical direction with button 1<br>
pressed. The value should be a list of 1 or 2 integers. The first<br>
integer specifies the timespan in microseconds before the active item<br>
should be changed to get nearer to the current mouse position. If there<br>
are two integers specified, the first is only used for the first motion<br>
event, any repeating motion events are handled after the seconds amount<br>
of miliseconds is elapsed.<br>
-yscrollincrement<br>
Specifies an increment for vertical scrolling, in any of the usual<br>
forms permitted for screen distances. If the value of this option is<br>
greater than zero, the vertical view in the window will be constrained<br>
so that the y coordinate at the top edge of the window is always an<br>
even multiple of -yscrollincrement; furthermore, the units for<br>
scrolling (e.g., the change in view when the top and bottom arrows<br>
of a scrollbar are selected) will also be -yscrollincrement. If the<br>
value of this option is less than or equal to zero, then vertical<br>
scrolling is unconstrained.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Data and other attributes defined here:<br>
<dl><dt><strong>TreectrlVersion</strong> = None</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Treectrl-__init__"><strong>__init__</strong></a>(self, master<font color="#909090">=None</font>, cnf<font color="#909090">={}</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-activate"><strong>activate</strong></a>(self, itemDesc)</dt><dd><tt>Sets the active item to the one described by ITEMDESC, and<br>
switches on the state ACTIVE for this item. From now on the item<br>
can be retrieved with the item description ACTIVE. An <ActiveItem><br>
event is generated.</tt></dd></dl>
<dl><dt><a name="Treectrl-bbox"><strong>bbox</strong></a>(self, area<font color="#909090">=None</font>)</dt><dd><tt>Returns a list with four elements giving the bounding box (left,<br>
top, right and bottom) of an area of the window. If AREA is not<br>
specified, then the result is the bounding box of the entire window.<br>
If AREA is CONTENT, then the result is the part of the window not<br>
including borders, headers, or locked columns. If AREA is HEADER, then<br>
the result is the part of the window not including borders where column<br>
titles are displayed. If AREA is LEFT, then the result is the part of<br>
the window not including borders or headers where left-locked columns<br>
are displayed. If AREA is RIGHT, then the result is the part of the<br>
window not including borders or headers where right-locked columns are<br>
displayed. None is returned if the display area has no height or width,<br>
which can be true for various reasons such as the window is too small,<br>
or the header is not displayed, or there aren't any locked columns.</tt></dd></dl>
<dl><dt><a name="Treectrl-canvasx"><strong>canvasx</strong></a>(self, screenx)</dt><dd><tt>Given a window x-coordinate in the treectrl screenx, this<br>
command returns the treectrl x-coordinate that is displayed<br>
at that location.</tt></dd></dl>
<dl><dt><a name="Treectrl-canvasy"><strong>canvasy</strong></a>(self, screeny)</dt><dd><tt>Given a window y-coordinate in the treectrl screeny, this<br>
command returns the treectrl y-coordinate that is displayed<br>
at that location.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_bbox"><strong>column_bbox</strong></a>(self, column)</dt><dd><tt>Returns a list with four elements giving the bounding box for the<br>
column header specified by COLUMN. If the treectrl is configured not to<br>
display the column headers by means of the showheader option,<br>
then None is returned instead.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_cget"><strong>column_cget</strong></a>(self, column, option)</dt><dd><tt>This command returns the current value of the option named OPTION<br>
for the column specified by COLUMN. COLUMN may also be the string TAIL<br>
to specify the tail column. OPTION may have any of the values accepted<br>
by the <a href="#Treectrl-column_configure">column_configure</a>() widget command.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_compare"><strong>column_compare</strong></a>(self, column1, op, column2)</dt><dd><tt>From both columns the index is retrieved (as returned from the<br>
<a href="#Treectrl-column_order">column_order</a>() widget command). Then these indexes are compared using<br>
the operator OP, which must be either <, <=, ==, >=, >, or !=.<br>
The return value of this command is True if the comparison evaluated to<br>
true, False otherwise.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_config"><strong>column_config</strong></a> = <a href="#Treectrl-column_configure">column_configure</a>(self, column, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-column_configure"><strong>column_configure</strong></a>(self, column, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the <a href="#Treectrl-configure">configure</a>() widget command except<br>
that it modifies options associated with the column specified by COLUMN<br>
instead of modifying options for the overall treectrl widget. COLUMN<br>
may be the string TAIL to specify the tail column. If COLUMN is the<br>
string ALL, at least one option-value pair must be given; in this case<br>
all the columns are configured.<br>
Available options are:<br>
arrow arrowbitmap arrowgravity arrowimage arrowpadx arrowpady<br>
arrowside background bitmap borderwidth button expand font<br>
gridleftcolor gridrightcolor image imagepadx imagepady<br>
itembackground itemjustify itemstyle justify lock maxwidth minwidth<br>
resize squeeze state stepwidth tags text textcolor textlines<br>
textpadx textpady uniform visible weight width widthhack</tt></dd></dl>
<dl><dt><a name="Treectrl-column_count"><strong>column_count</strong></a>(self, *args)</dt><dd><tt>If no additional argument is given, returns an integer giving the<br>
number of columns created by the <a href="#Treectrl-column_create">column_create</a>() widget command which<br>
haven't been deleted by the <a href="#Treectrl-column_delete">column_delete</a>() widget command. The tail<br>
column is not counted in this case. If argument(s) are given, the<br>
result is the number of columns that match the column description.<br>
For example:<br>
colum_count('visible') will return the number of columns whose<br>
-visible option is True, and:<br>
<a href="#Treectrl-column_count">column_count</a>('tag', 'a^b') will return the number of columns<br>
with either tag "a" or "b", but not both.<br>
Multiple column descriptions may be combined, like:<br>
<a href="#Treectrl-column_count">column_count</a>('tag', 'foo', 'tag', 'bar', 'visible')</tt></dd></dl>
<dl><dt><a name="Treectrl-column_create"><strong>column_create</strong></a>(self, *args, **kw)</dt><dd><tt>This command creates a new column in the treectrl widget. The new<br>
column is placed to the right of all other columns (except the tail<br>
column). Any option-value arguments configure the new column according<br>
to the <a href="#Treectrl-column_configure">column_configure</a>() command. The return value is the unique<br>
identifier of the new column.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_delete"><strong>column_delete</strong></a>(self, first, last<font color="#909090">=None</font>)</dt><dd><tt>Deletes the specified column(s) from the treectrl widget. If either<br>
FIRST or LAST is specified as ALL, then all columns are deleted. The<br>
tail column cannot be deleted and it is an error to specify it. The<br>
order of first and last doesn't matter, and first may be equal to<br>
last.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_dragcget"><strong>column_dragcget</strong></a>(self, option)</dt></dl>
<dl><dt><a name="Treectrl-column_dragconfigure"><strong>column_dragconfigure</strong></a>(self, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>The user can move a column within a treectrl by drag-and-drop.<br>
Feedback consists of a semi-transparent photo image of the header of<br>
the column being dragged and a 2-pixel-thick vertical line to indicate<br>
where the column may be dropped. The drag image consists of a colored<br>
background rectangle plus the image and/or text displayed in the column<br>
header. The 2-pixel-thick line will be drawn over the left edge of the<br>
column before which the dragged column may be dropped.<br>
The library scripts generate a <ColumnDrag-accept> event when the user<br>
has successfully drag-and-drop'd a column. You will have to bind a<br>
callback to this event if you want to move the dragged column.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_id"><strong>column_id</strong></a>(self, column)</dt><dd><tt>This command resolves the column description COLUMN into a unique<br>
column identifier. If the column described by COLUMN doesn't exist,<br>
this command returns None.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_list"><strong>column_list</strong></a>(self, visible<font color="#909090">=False</font>)</dt><dd><tt>This command returns a list of identifiers for every column (except<br>
the tail) from left to right. If VISIBLE is True, only columns whose<br>
visible option is True are returned.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_move"><strong>column_move</strong></a>(self, column, before)</dt><dd><tt>Moves the specified COLUMN to the left of the column specified by<br>
BEFORE. If BEFORE is the string TAIL, the column COLUMN will become the<br>
last column.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_neededwidth"><strong>column_neededwidth</strong></a>(self, column)</dt><dd><tt>This command returns an integer giving the needed width of the<br>
column specified by COLUMN. The needed width is the maximum of the<br>
width of the column header and the width of the widest currently<br>
visible item.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_order"><strong>column_order</strong></a>(self, column, visible<font color="#909090">=False</font>)</dt><dd><tt>This command returns an integer giving the position of COLUMN in the<br>
list of columns starting from zero for the leftmost column. If VISIBLE<br>
is True, only columns whose visible option is True are considered,<br>
and -1 is returned if COLUMN's visible option is False.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_tag_add"><strong>column_tag_add</strong></a>(self, column, *tags)</dt><dd><tt>Adds each tag in TAGS to the columns specified by the column<br>
description COLUMN. Duplicate tags are ignored. The list of tags for a<br>
column can also be changed via <a href="#Treectrl-column_configure">column_configure</a>(tags=(...)).</tt></dd></dl>
<dl><dt><a name="Treectrl-column_tag_expr"><strong>column_tag_expr</strong></a>(self, column, tag)</dt><dd><tt>Evaluates the tag expression TAG against every column specified by<br>
the column description COLUMN. The result is True if the tag expression<br>
evaluates to True for every column, False otherwise.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_tag_names"><strong>column_tag_names</strong></a>(self, column)</dt><dd><tt>Returns a list of tag names assigned to the columns specified by the<br>
column description COLUMN. The result is the union of any tags assigned<br>
to the columns.</tt></dd></dl>
<dl><dt><a name="Treectrl-column_tag_remove"><strong>column_tag_remove</strong></a>(self, column, *tags)</dt><dd><tt>Removes each tag in TAGS from the columns specified by the column<br>
description COLUMN. It is not an error if any of the columns do not use<br>
any of the tags. The list of tags for a column can also be changed via<br>
<a href="#Treectrl-column_configure">column_configure</a>(tags=(...).</tt></dd></dl>
<dl><dt><a name="Treectrl-column_width"><strong>column_width</strong></a>(self, column)</dt><dd><tt>This command returns an integer giving the width in pixels of the<br>
column specified by COLUMN, even if the treectrl is configured to not<br>
display the column headers by means of the showheader option</tt></dd></dl>
<dl><dt><a name="Treectrl-contentbox"><strong>contentbox</strong></a>(self)</dt><dd><tt>Returns a tuple with four elements giving the bounding box for the<br>
space used to display the items, i.e. the space of the treectrl window<br>
without the surrounding borders or the column headers. The return value<br>
is None if the content area is totally obscurred by column headers,<br>
borders, and/or locked columns. Typically this will only happen if the<br>
window is too small.</tt></dd></dl>
<dl><dt><a name="Treectrl-create_column"><strong>create_column</strong></a> = <a href="#Treectrl-column_create">column_create</a>(self, *args, **kw)</dt></dl>
<dl><dt><a name="Treectrl-create_element"><strong>create_element</strong></a> = <a href="#Treectrl-element_create">element_create</a>(self, name<font color="#909090">=None</font>, type<font color="#909090">=None</font>, *args, **kw)</dt></dl>
<dl><dt><a name="Treectrl-create_gradient"><strong>create_gradient</strong></a> = <a href="#Treectrl-gradient_create">gradient_create</a>(self, name<font color="#909090">=None</font>, *args, **kw)</dt></dl>
<dl><dt><a name="Treectrl-create_item"><strong>create_item</strong></a> = <a href="#Treectrl-item_create">item_create</a>(self, *args, **kw)</dt></dl>
<dl><dt><a name="Treectrl-create_style"><strong>create_style</strong></a> = <a href="#Treectrl-style_create">style_create</a>(self, name<font color="#909090">=None</font>, *args, **kw)</dt></dl>
<dl><dt><a name="Treectrl-debug_cget"><strong>debug_cget</strong></a>(self, element, option)</dt><dd><tt>This command returns the current value of the debugging option named<br>
OPTION. OPTION may have any of the values accepted by the debug<br>
configure widget command.</tt></dd></dl>
<dl><dt><a name="Treectrl-debug_configure"><strong>debug_configure</strong></a>(self, element, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the configure widget command except that<br>
it modifies debugging options instead of modifying options for the<br>
overall treectrl widget. If no option is specified, the command<br>
returns a list describing all of the available debugging options.</tt></dd></dl>
<dl><dt><a name="Treectrl-debug_dinfo"><strong>debug_dinfo</strong></a>(self)</dt><dd><tt>For every of the treectrl widget a line with some internal values<br>
info about all items is printed to stdout.</tt></dd></dl>
<dl><dt><a name="Treectrl-debug_scroll"><strong>debug_scroll</strong></a>(self)</dt><dd><tt>Returns a string useful for debugging vertical scrolling.</tt></dd></dl>
<dl><dt><a name="Treectrl-delete_column"><strong>delete_column</strong></a> = <a href="#Treectrl-column_delete">column_delete</a>(self, first, last<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Treectrl-delete_element"><strong>delete_element</strong></a> = <a href="#Treectrl-element_delete">element_delete</a>(self, *elements)</dt></dl>
<dl><dt><a name="Treectrl-delete_gradient"><strong>delete_gradient</strong></a> = <a href="#Treectrl-gradient_delete">gradient_delete</a>(self, *gradients)</dt></dl>
<dl><dt><a name="Treectrl-delete_item"><strong>delete_item</strong></a> = <a href="#Treectrl-item_delete">item_delete</a>(self, first, last<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Treectrl-delete_style"><strong>delete_style</strong></a> = <a href="#Treectrl-style_delete">style_delete</a>(self, style)</dt></dl>
<dl><dt><a name="Treectrl-depth"><strong>depth</strong></a>(self, itemDesc<font color="#909090">=None</font>)</dt><dd><tt>If the additional argument ITEMDESC is specified, returns an integer<br>
giving the depth of the item describing by ITEMDESC, whereas depth is<br>
defined as the number of steps you must go upward to reach to root<br>
item. If no ITEMDESC is specified, the maximum depth of all items in<br>
the treectrl widget is returned instead.</tt></dd></dl>
<dl><dt><a name="Treectrl-dragimage_add"><strong>dragimage_add</strong></a>(self, itemDesc, column<font color="#909090">=None</font>, element<font color="#909090">=None</font>)</dt><dd><tt>Adds the shapes of the item described by ITEMDESC to the shapes of<br>
the dragimage. Specifying additional arguments reduces the number of<br>
rectangles that are added to the dragimage. If no additional arguments<br>
is specified, for every element of the item in every column a dotted<br>
rectangles is added. If COLUMN is specified, all elements in other<br>
columns are ignored. If also ELEMENT is specified, only a rectangle for<br>
this one element of the specified item in the given column is added.</tt></dd></dl>
<dl><dt><a name="Treectrl-dragimage_cget"><strong>dragimage_cget</strong></a>(self, option)</dt><dd><tt>This command returns the current value of the dragimage option named<br>
OPTION. OPTION may have any of the values accepted by the<br>
<a href="#Treectrl-dragimage_configure">dragimage_configure</a>() widget command.</tt></dd></dl>
<dl><dt><a name="Treectrl-dragimage_clear"><strong>dragimage_clear</strong></a>(self)</dt><dd><tt>Removes all shapes (if there are any) from the dragimage. This<br>
command does not modify the dragimage offset.</tt></dd></dl>
<dl><dt><a name="Treectrl-dragimage_config"><strong>dragimage_config</strong></a> = <a href="#Treectrl-dragimage_configure">dragimage_configure</a>(self, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-dragimage_configure"><strong>dragimage_configure</strong></a>(self, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the configure widget command except that<br>
it modifies the dragimage options instead of modifying options for the<br>
overall treectrl widget. If no option is specified, the command returns<br>
a list describing all of the available dragimage options</tt></dd></dl>
<dl><dt><a name="Treectrl-dragimage_offset"><strong>dragimage_offset</strong></a>(self, x<font color="#909090">=None</font>, y<font color="#909090">=None</font>)</dt><dd><tt>Returns a list containing the x and y offsets of the dragimage, if<br>
no additional arguments are specified. The dragimage offset is the<br>
screen distance, the image is displayed relative to the item its shape<br>
is derived from. If two coordinates are specified, sets the dragimage<br>
offset to the given coordinates X and Y.</tt></dd></dl>
<dl><dt><a name="Treectrl-element_cget"><strong>element_cget</strong></a>(self, element, option)</dt><dd><tt>This command returns the current value of the option named OPTION<br>
associated with the element given by ELEMENT. OPTION may have any of<br>
the values accepted by the <a href="#Treectrl-element_configure">element_configure</a>() widget command.</tt></dd></dl>
<dl><dt><a name="Treectrl-element_config"><strong>element_config</strong></a> = <a href="#Treectrl-element_configure">element_configure</a>(self, element, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-element_configure"><strong>element_configure</strong></a>(self, element, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the <a href="#Treectrl-configure">configure</a>() widget command except<br>
that it modifies options associated with the element given by ELEMENT<br>
instead of modifying options for the overall treectrl widget. If no<br>
option is specified, the command returns a list describing all of the<br>
available options for ELEMENT.</tt></dd></dl>
<dl><dt><a name="Treectrl-element_create"><strong>element_create</strong></a>(self, name<font color="#909090">=None</font>, type<font color="#909090">=None</font>, *args, **kw)</dt><dd><tt>Create a new elememt in SELF of type TYPE with name NAME. The exact<br>
format of the arguments after type depends on TYPE, but generally<br>
consist of specifications for zero or more element options.<br>
This command returns the name for the new element.</tt></dd></dl>
<dl><dt><a name="Treectrl-element_delete"><strong>element_delete</strong></a>(self, *elements)</dt><dd><tt>Deletes each of the named ELEMENTS. If an element is deleted while<br>
it is still configured as an element of one or more styles by means of<br>
the <a href="#Treectrl-style_elements">style_elements</a>() widget command, it is also removed from the<br>
element lists of these styles.</tt></dd></dl>
<dl><dt><a name="Treectrl-element_names"><strong>element_names</strong></a>(self)</dt><dd><tt>Returns a list containing the names of all existing elements.</tt></dd></dl>
<dl><dt><a name="Treectrl-element_perstate"><strong>element_perstate</strong></a>(self, element, option, *statelist)</dt><dd><tt>This command returns the value of the per-state option named option<br>
for element for a certain state. StateList is a list of state names<br>
(static and dynamic) which specifies the state to use.</tt></dd></dl>
<dl><dt><a name="Treectrl-element_type"><strong>element_type</strong></a>(self, element)</dt><dd><tt>Returns the type of the elements given by ELEMENT, such as<br>
"rect" or "text".</tt></dd></dl>
<dl><dt><a name="Treectrl-filelist_emulate_win7"><strong>filelist_emulate_win7</strong></a>(self, win7<font color="#909090">=None</font>)</dt><dd><tt>Query or change the flag indicating that Windows 7 behavior should<br>
be used. If called without arguments returns True or False depending<br>
on the current state. If called with a boolean value as argument<br>
changes the behavior according to the given value.</tt></dd></dl>
<dl><dt><a name="Treectrl-gradient_cget"><strong>gradient_cget</strong></a>(self, gradient, option)</dt><dd><tt>Returns the current value of the configuration option for the<br>
gradient specified by GRADIENT whose name is OPTION. Option may have<br>
any of the values accepted by the <a href="#Treectrl-gradient_configure">gradient_configure</a>() command.</tt></dd></dl>
<dl><dt><a name="Treectrl-gradient_config"><strong>gradient_config</strong></a> = <a href="#Treectrl-gradient_configure">gradient_configure</a>(self, gradient, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-gradient_configure"><strong>gradient_configure</strong></a>(self, gradient, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the <a href="#Treectrl-configure">configure</a>() widget command except<br>
that it modifies options associated with the gradient given by GRADIENT<br>
instead of modifying options for the overall treectrl widget. If no<br>
option is specified, the command returns a list describing all of the<br>
available options for GRADIENT.<br>
The following options are supported (see gradient create for the<br>
meaning of each option):<br>
bottom left orient right steps stops top</tt></dd></dl>
<dl><dt><a name="Treectrl-gradient_create"><strong>gradient_create</strong></a>(self, name<font color="#909090">=None</font>, *args, **kw)</dt><dd><tt>Creates a new gradient with the name NAME, which must be a unique<br>
name not used by another gradient created by this treectrl widget.<br>
If NAME is None a unique name will be created by the widget.<br>
The following options are supported:<br>
-bottom coordSpec<br>
-left coordSpec<br>
-right coordSpec<br>
-top coordSpec<br>
Each of these options specifies one edge of the gradient brush.<br>
If the option is specified as an empty string (the default),<br>
the gradient brush's edge is the same as that of whatever<br>
rectangle is being painted using the gradient.<br>
The format of each of these options is a tuple of 2 or more<br>
values (value, coordType, ?arg ...?), where value is a floating<br>
point number (usually from 0.0 to 1.0) and coordType is one of<br>
AREA, CANVAS, COLUMN or ITEM. The AREA keyword must be followed<br>
by one of the same area names that the bbox command accepts.<br>
The COLUMN keyword may be followed by a column description<br>
specifying exactly one column. The ITEM keyword may be followed<br>
by an item description specifying exactly one item.<br>
-orient direction<br>
This option specifies the direction a linear gradient changes<br>
color in. Must be either horizontal (the default) or vertical<br>
or an abbreviation of one of these.<br>
-steps stepCount<br>
Specifies the number of bands of color drawn for each color<br>
stop described by the -stops option. The default value is 1,<br>
the maximum is 25. This option has no effect if gradients are<br>
drawn using something better than Tk API calls.<br>
-stops stopsList<br>
Specifies the color stops along this gradient. The argument<br>
stopsList has the following form:<br>
((offset color ?opacity?), (offset color ?opacity?) ...)<br>
Each offset is a floating point number from 0.0 to 1.0<br>
specifying the distance from the start of the gradient<br>
where the color begins. Each color is a Tk color name or<br>
description. Each optional opacity is a floating point number<br>
from 0.0 to 1.0 specifying how transparent the gradient is.<br>
If stopsList is non-empty there must be at least two stops<br>
specified, and the first offset must be 0.0 and the last offset<br>
must be 1.0. Any other stop offsets must be listed in<br>
increasing order. Specifying opacity has no effect if gradients<br>
are drawn using Tk API calls.</tt></dd></dl>
<dl><dt><a name="Treectrl-gradient_delete"><strong>gradient_delete</strong></a>(self, *gradients)</dt><dd><tt>Deletes each gradient specified in GRADIENTS. If the gradient is<br>
still being used then it is not actually deleted until all elements<br>
etc using the gradient have stopped using it. A deleted-but-in-use<br>
gradient is not recognized by the various gradient commands.<br>
Creating a new gradient with the same name as a deleted-but-in-use<br>
gradient resurrects the deleted gradient.</tt></dd></dl>
<dl><dt><a name="Treectrl-gradient_names"><strong>gradient_names</strong></a>(self)</dt><dd><tt>Returns a list of names of all the gradients that have been<br>
created by this treectrl widget.</tt></dd></dl>
<dl><dt><a name="Treectrl-gradient_native"><strong>gradient_native</strong></a>(self, preference<font color="#909090">=None</font>)</dt><dd><tt>Without any arguments, this command returns a boolean indicating<br>
whether or not the platform supports native transparent gradients.<br>
The preference argument is a boolean that indicates whether native<br>
gradients should be used; this can be used to test the appearance<br>
of the application.</tt></dd></dl>
<dl><dt><a name="Treectrl-identify"><strong>identify</strong></a>(self, x, y)</dt><dd><tt>Returns a list containing some diagnostics about what is displayed<br>
at the given windows coordinates x and y. The resulting list may be<br>
empty, if nothing is displayed at the given coordinates, otherwise<br>
the first list element is "header" or "item".<br>
If the coordinates are in the header area and thus the first element of<br>
the result is header, the number of the column or the string tail is<br>
the second element in the resulting list; if the x coordinate is near<br>
the left or right end of the header, a third element left or right is<br>
added respectively. If the coordinates are below the header area and<br>
thus the first element of the result is item, the numerical id of the<br>
item is the second element in the resulting list. If the x coordinate<br>
doesn't fall into the column displaying the hierarchical structure,<br>
the elements column and the column number are added. If the<br>
x coordinate is within the column displaying the hierarchical<br>
structure, the following elements are added to the resulting list:<br>
line and the numerical id of the item the line comes from, if the<br>
x coordinate is above an item connecting line; button, if the<br>
x coordinate is above a button; column, the column<br>
number, elem, and the element name, if the x coordinate is above an<br>
element of the item; column and the column number, if the x coordinate<br>
is to the right of the elements; nothing otherwise.</tt></dd></dl>
<dl><dt><a name="Treectrl-is_sensitive"><strong>is_sensitive</strong></a>(self, x, y)</dt><dd><tt>Returns True if the given window coordinates are over an element<br>
that should respond to mouse clicks. The list of elements that<br>
respond to mouse clicks is set by calling <a href="#Treectrl-set_sensitive">set_sensitive</a>().</tt></dd></dl>
<dl><dt><a name="Treectrl-is_sensitive_marquee"><strong>is_sensitive_marquee</strong></a>(self, x, y)</dt><dd><tt>Returns True if the given window coordinates are over an element<br>
that should respond to the marquee. The list of elements that respond<br>
to the marquee is set by calling <a href="#Treectrl-set_sensitive_marquee">set_sensitive_marquee</a>(), or if that<br>
list is empty then the same list passed to <a href="#Treectrl-set_sensitive">set_sensitive</a>().</tt></dd></dl>
<dl><dt><a name="Treectrl-item_ancestors"><strong>item_ancestors</strong></a>(self, itemDesc)</dt><dd><tt>Returns a list containing the item ids of the ancestors of the item<br>
specified by itemDesc. The first list value is the parent, the second<br>
is the parent's parent, an so on. The last list value will be the root<br>
item if itemDesc is a descendant of the root item.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_bbox"><strong>item_bbox</strong></a>(self, itemDesc, column<font color="#909090">=None</font>, element<font color="#909090">=None</font>)</dt><dd><tt>Returns a list with four elements giving the bounding box for the<br>
item described by itemDesc. If no further argument is specified, the<br>
bbox spans the area of the item over all columns. If a column is<br>
specified, only the area of the item in this column is considered, if<br>
an additional element is specified, the area of this element in column<br>
of the specified item is returned.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_buttonstate"><strong>item_buttonstate</strong></a>(self, itemDesc, state<font color="#909090">=None</font>)</dt><dd><tt>If STATE is specified, this command sets the state of the<br>
expand/collapse button for the single item specified by ITEMDESC.<br>
The state argument may be one of ACTIVE, NORMAL or PRESSED.<br>
The current (or newly-set) state of the button is returned.<br>
The button state is used by the system theme, if any, to change<br>
the appearance of the button.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_cget"><strong>item_cget</strong></a>(self, itemDesc, option)</dt><dd><tt>Returns the current value of the configuration option for the item<br>
specified by ITEMDESC whose name is OPTION. OPTION may have any of the<br>
values accepted by the <a href="#Treectrl-item_configure">item_configure</a>() command.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_children"><strong>item_children</strong></a>(self, itemDesc)</dt><dd><tt>Returns a list containing the item ids of all children of the item<br>
specified by ITEMDESC in the correct order from the first child to the<br>
last child.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_collapse"><strong>item_collapse</strong></a>(self, itemDesc, recurse<font color="#909090">=False</font>, animate<font color="#909090">=False</font>)</dt><dd><tt>Switches off the open state of the item(s) described by ITEMDESC. If<br>
the item has descendants, they are no longer displayed. If the item is<br>
configured to have a button, the button will now display the image or<br>
bitmap configured with the widget options -buttonimage or<br>
-buttonbitmap, or a + sign if no image or bitmap is configured.<br>
If the item is already closed, this command has no effect.<br>
ITEMDESC may also be the string ALL, in which case all items of the<br>
treectrl widget are collapsed. If ANIMATE is True, then the item's<br>
button will animate as it transitions between states if the theme<br>
supports it; in this case only one item may be specified.<br>
If RECURSE is True, all descendants of ITEMDESC will also be<br>
collapsed. For every item, that actually will be collapsed, two events<br>
are generated: a <Collapse-before> event before the item state is<br>
changed, and a <Collapse-after> event after the item state was<br>
changed.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_compare"><strong>item_compare</strong></a>(self, itemDesc1, op, itemDesc2)</dt><dd><tt>From both items described by the ITEMDESCs the index is retrieved<br>
(as returned from the <a href="#Treectrl-item_order">item_order</a>() widget command). Then these indexes<br>
are compared using the operator OP, which must be either<br>
<, <=, ==, >=, >, or != . The return value of this command is True if<br>
the comparison evaluated to true, False otherwise.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_config"><strong>item_config</strong></a> = <a href="#Treectrl-item_configure">item_configure</a>(self, itemDesc, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-item_configure"><strong>item_configure</strong></a>(self, itemDesc, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>If no option is specified, returns a list describing all of the<br>
available options for the item given by ITEMDESC.<br>
If option is specified with no value, then the command returns a list<br>
describing the one named option (this list will be identical to the<br>
corresponding sublist of the value returned if no option is specified).<br>
If one or more option-value pairs are specified, then the command<br>
modifies the given item option(s) to have the given value(s);<br>
in this case the command returns an empty string.<br>
The following options are supported by this command (see <a href="#Treectrl-item_create">item_create</a>()<br>
for the meaning of each option):<br>
button boolean<br>
height height<br>
tags tuple<br>
visible boolean<br>
wrap boolean</tt></dd></dl>
<dl><dt><a name="Treectrl-item_count"><strong>item_count</strong></a>(self, *args)</dt><dd><tt>If no additional argument is given, returns an integer giving the<br>
number of items created by the <a href="#Treectrl-item_create">item_create</a>() widget command which<br>
haven't been deleted by the <a href="#Treectrl-item_delete">item_delete</a>() widget command, plus 1 for<br>
the ever-present root item. If argument(s) are given, the result is the<br>
number of items that match the item description. For example:<br>
<a href="#Treectrl-item_count">item_count</a>('visible') will return the number of items whose<br>
-visible option is true, and:<br>
<a href="#Treectrl-item_count">item_count</a>('tag', 'a^b') will return the number of items with<br>
either tag "a" or "b", but not both.<br>
Multiple item descriptions may be combined, like:<br>
<a href="#Treectrl-item_count">item_count</a>('tag', 'foo', 'tag', 'bar', 'visible')</tt></dd></dl>
<dl><dt><a name="Treectrl-item_create"><strong>item_create</strong></a>(self, *args, **kw)</dt><dd><tt>Creates some new items and optionally returns a list of unique<br>
identifiers for those items. The new items have the states open and<br>
enabled set by default. If the treectrl widget currently has the focus,<br>
the state focus is also set.<br>
The following options are supported by this command:<br>
-button boolean<br>
Boolean indicates whether or not an expand/collapse button should<br>
be drawn next to this item, typically to indicate the item has<br>
children. The button will only be displayed if: a) the column<br>
specified by the treectrl option -treecolumn is visible;<br>
and b) the treectrl option -showbuttons is true<br>
-count numItems<br>
Specifies the number of items to create. Must be >= 0.<br>
Defaults to 1.<br>
-enabled boolean<br>
Specifies whether the items should be enabled. Default is true.<br>
-height height<br>
Specifies a fixed height in any of the forms acceptable to<br>
Tk_GetPixels. Must be >= 0. If height is zero then the item's<br>
height is unspecified. Defaults to 0.<br>
-nextsibling itemDesc<br>
Specifies the item before which the new items will be inserted.<br>
The new items will have the same parent as itemDesc.<br>
-open boolean<br>
Specifies whether the items should be open or closed.<br>
Default is true.<br>
-parent itemDesc<br>
Specifies the item which the new items will be the children of.<br>
The new items will be appended to the list of children of itemDesc.<br>
-prevsibling itemDesc<br>
Specifies the item after which the new items will be inserted. The<br>
new items will have the same parent as itemDesc.<br>
-returnid boolean<br>
Specifies whether or not to return a list of item identifiers for<br>
the newly created items. Specifying false is useful when creating<br>
a large number of items in the console or to improve performance.<br>
Default is true.<br>
-tags tuple<br>
Tags are textual labels applied to items to group them. Tags do<br>
not affect the appearance or behaviour of items. Tags can be used<br>
in item descriptions to operate on multiple items.<br>
-visible boolean<br>
It indicates that the item should be displayed<br>
in the list. The item will only be displayed if: a) each ancestor<br>
is a descendant of the root item (not an orphan); and<br>
b) each ancestor's -visible option is true.<br>
-wrap boolean<br>
When this option is true an item will be the first in a horizontal<br>
(when the treectrl option -orient=horizontal) or a vertical (when<br>
the treectrl option -orient=vertical) range of items.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_delete"><strong>item_delete</strong></a>(self, first, last<font color="#909090">=None</font>)</dt><dd><tt>Deletes the specified item(s). FIRST and LAST must be the string<br>
ALL or a valid item description. If either FIRST or LAST is specified<br>
as ALL, then all items are deleted. If FIRST is specified and LAST<br>
isn't specified, the item described by FIRST is deleted. If both FIRST<br>
and LAST are specified, they must decribe items with a common ancestor;<br>
then the range of items between FIRST and LAST is deleted. Deleting an<br>
item deletes any child items of the deleted item recursively. If the<br>
current active item is deleted, the root item becomes the new active<br>
item. If the current selection anchor item is deleted, the root item<br>
becomes the new anchor item. There is no way to delete the root item<br>
of the treectrl widget; in all cases the specification of the root item<br>
is ignored. For each call to this command, two events may be generated.<br>
If any of the deleted items are selected, then a <Selection> event is<br>
generated just before the items are deleted. If any items were actually<br>
deleted, then an <ItemDelete> event is generated just before the items<br>
are deleted.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_descendants"><strong>item_descendants</strong></a>(self, itemDesc)</dt><dd><tt>Returns a tuple containing the item ids of the descendants of the<br>
item specified by itemDesc, i.e. the children, grandchildren,<br>
great-grandchildren etc, of the item.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_dump"><strong>item_dump</strong></a>(self, itemDesc)</dt><dd><tt>Returns a list with four elements in the form<br>
(index, *index*, indexVis, *indexVis*).</tt></dd></dl>
<dl><dt><a name="Treectrl-item_enabled"><strong>item_enabled</strong></a>(self, itemDesc, enabled<font color="#909090">=None</font>)</dt><dd><tt>Returns True if the item described by ITEMDESC has the state<br>
"enabled" switched on, False otherwise. If ENABLED is specified, then<br>
the "enabled" state of every item described by the item description<br>
ITEMDESC is set accordingly. All items are enabled when first created.<br>
Disabled items cannot be selected, and are ignored by the default<br>
key-navigation and mouse bindings.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_expand"><strong>item_expand</strong></a>(self, itemDesc, recurse<font color="#909090">=False</font>, animate<font color="#909090">=False</font>)</dt><dd><tt>Switches on the open state of the item(s) described by ITEMDESC. If<br>
the item has descendants, they are now displayed. If the item is<br>
configured to have a button, the button will now display the image or<br>
bitmap configured with the widget options -buttonimage or<br>
-buttonbitmap, or a - sign if no image or bitmap is configured.<br>
If the item is already open, this command has no effect.<br>
If ANIMATE is specified, then the item's button will animate as it<br>
transitions between states if the theme supports it; in this case only<br>
one item may be specified. ItemDesc may also be the string ALL, in<br>
which case all items of the treectrl widget are expanded.<br>
If RECURSE is True, all descendants of ITEMDESC will<br>
also be expanded. For every item, that actually will be expanded,<br>
two events are generated: an <Expand-before> event before the<br>
item state is changed, and an <Expand-after> event after the<br>
item state was changed.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_firstchild"><strong>item_firstchild</strong></a>(self, parent, child<font color="#909090">=None</font>)</dt><dd><tt>If CHILD is not specified, returns the item id of the first child of<br>
the item described by PARENT. If CHILD is specified, it must describe<br>
an item that is not an ancestor of PARENT. Then it will become the new<br>
first child of PARENT.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_id"><strong>item_id</strong></a>(self, itemDesc)</dt><dd><tt>New in treectrl-2.2 :<br>
This command resolves the item description ITEMDESC into a<br>
tuple of unique item identifier(s).If ITEMDESC doesn't refer to any<br>
existing items, then this command returns None. For example:<br>
<a href="#Treectrl-item_id">item_id</a>(ALL) will return a tuple of ids for all items, and:<br>
<a href="#Treectrl-item_id">item_id</a>(<a href="#Treectrl-item_children">item_children</a>(someItem)) will return the ids of<br>
every child of an item.<br>
On previous versions of the treectrl widget, a tuple containing only<br>
one item id will be returned.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_image"><strong>item_image</strong></a>(self, itemDesc, *columnAndImage)</dt><dd><tt>This command sets or retrieves the value of the per-state -image<br>
option for the first image element in one or more columns. If no column<br>
is specified, this command returns a list of values, one per column. If<br>
no image is specified, this command returns the value for column. If<br>
one or more column-image pairs is specified, then the value of the<br>
-image option in each column is set to image. Note that this command is<br>
provided as a convenience. Use the <a href="#Treectrl-itemelement_configure">itemelement_configure</a>() or<br>
<a href="#Treectrl-itemelement_cget">itemelement_cget</a>() commands if you want to set or retrieve the value<br>
of the -image option for a specific image element.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_isancestor"><strong>item_isancestor</strong></a>(self, itemDesc, descendant)</dt><dd><tt>Returns True if the item described by ITEMDESC is a direct or<br>
indirect parent of the item decribed by DESCENDANT, False otherwise.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_isopen"><strong>item_isopen</strong></a>(self, itemDesc)</dt><dd><tt>Returns True if the item described by itemDesc has the state open<br>
switched on, False otherwise.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_lastchild"><strong>item_lastchild</strong></a>(self, parent, child<font color="#909090">=None</font>)</dt><dd><tt>If CHILD is not specified, returns the item id of the last child of<br>
the item described by PARENT. If CHILD is specified, it must describe<br>
an item that is not an ancestor of PARENT. Then it will become the new<br>
last child of PARENT.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_nextsibling"><strong>item_nextsibling</strong></a>(self, sibling, next<font color="#909090">=None</font>)</dt><dd><tt>If NEXT is not specified, returns the item id of the next sibling of<br>
the item described by SIBLING. If NEXT is specified, it must describe<br>
an item that is not an ancestor of SIBLING. Then it will become the new<br>
next sibling of SIBLING.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_numchildren"><strong>item_numchildren</strong></a>(self, itemDesc)</dt><dd><tt>Returns the number of children of the item described by ITEMDESC.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_order"><strong>item_order</strong></a>(self, itemDesc, visible<font color="#909090">=False</font>)</dt><dd><tt>This command returns the position of the item ITEMDESC relative to<br>
its toplevel ancestor (usually the root item, unless the ancestor is an<br>
orphan). If you imagine all the items flattened into a vertical list,<br>
the result of this command is the row the item falls in. If the<br>
optional argument -visible is given, only the items whose ancestors<br>
are expanded, and whose -visible option is true, get counted; in this<br>
case -1 is returned if the item is not visible.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_parent"><strong>item_parent</strong></a>(self, itemDesc)</dt><dd><tt>Returns the item id of the parent of the item described by<br>
ITEMDESC.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_prevsibling"><strong>item_prevsibling</strong></a>(self, sibling, prev<font color="#909090">=None</font>)</dt><dd><tt>If PREV is not specified, returns the item id of the previous<br>
sibling of the item described by SIBLING. If PREV is specified, it<br>
must describe an item that is not an ancestor of SIBLING. Then it will<br>
become the new previous sibling of SIBLING.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_range"><strong>item_range</strong></a>(self, first, last)</dt><dd><tt>Returns a list containing the item ids of all items in the range<br>
between FIRST and LAST, inclusive. The order between FIRST and LAST<br>
doesn't matter, and the result is always sorted by the increasing order<br>
of the items (as returned by the item order command). The items<br>
specified by FIRST and LAST must share a common ancestor.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_remove"><strong>item_remove</strong></a>(self, itemDesc)</dt><dd><tt>Removes the item described by ITEMDESC from the list of children of<br>
its parent, so that it will become an orphan.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_rnc"><strong>item_rnc</strong></a>(self, itemDesc)</dt><dd><tt>Returns a list of two integers, which corresponds to the row and<br>
column of the item described by ITEMDESC. The row and column<br>
corresponds to the on-screen arrangement of items as determined by<br>
the -orient and -wrap options.<br>
If the item is not displayed, this command returns None.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_sort"><strong>item_sort</strong></a>(self, itemDesc, column<font color="#909090">=None</font>, element<font color="#909090">=None</font>, first<font color="#909090">=None</font>, last<font color="#909090">=None</font>, mode<font color="#909090">=None</font>, command<font color="#909090">=None</font>, notreally<font color="#909090">=False</font>)</dt><dd><tt>Sorts the children of the item described by ITEMDESC, and redisplays<br>
the tree with the items in the new order. The range of items which<br>
should be sorted can be restricted by means of the FIRST and/or LAST<br>
options, which should be children of the item described by ITEMDESC;<br>
the order between these two limiting items doesn't matter. The sort<br>
column can be specified by means of the COLUMN option; this option<br>
can be used repeatedly to define a multicolumn sort. The sorting is<br>
done by looking at the text of the element specified by the ELEMENT<br>
option, which must be a text element defined in the style of the<br>
sorting column; by default the first text element is used.<br>
If the NOTREALLY option is True, no rearranging of the items is<br>
done; instead the sorted items are returned as result of the command.<br>
By default ASCII sorting is used with the result returned in increasing<br>
order. Any of the following options (or a sequence of options) may be<br>
specified as MODE to control the sorting process of the previously<br>
specified column (unique abbreviations are accepted):<br>
ascii<br>
Use string comparison with ASCII collation order.<br>
This is the default.<br>
command command<br>
Use command as a comparison command. To compare two items,<br>
evaluate a command with the numerical ids of the two items passed<br>
as arguments. The comamnd should return an integer less than,<br>
equal to, or greater than zero if the first item is to be<br>
considered less than, equal to, or greater than the second,<br>
respectively.<br>
decreasing<br>
Sort the items in decreasing order ("largest" items first).<br>
dictionary<br>
Use dictionary-style comparison. This is the same as -ascii except<br>
(a) case is ignored except as a tie-breaker and<br>
(b) if two strings contain embedded numbers, the numbers compare<br>
as integers, not characters. For example, in -dictionary mode,<br>
bigBoy sorts between bigbang and bigboy,<br>
and x10y sorts between x9y and x11y.<br>
increasing<br>
Sort the items in increasing order ("smallest" items first).<br>
This is the default.<br>
integer<br>
Convert to integers and use integer comparison.<br>
real<br>
Convert to floating-point values and use floating comparison.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_span"><strong>item_span</strong></a>(self, itemDesc, *columnAndNumColumns)</dt><dd><tt>This command sets or retrieves the number of columns that a style<br>
covers. If no column is specified, the return value is a list of spans,<br>
one per column. If no numColumns is specified, the return value is the<br>
span for column. If one or more column-numColumns pairs is specified,<br>
the span for each column is set to numColumns.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_tag_add"><strong>item_tag_add</strong></a>(self, itemDesc, *tags)</dt><dd><tt>Adds each tag in TAGS to the items specified by the item description<br>
ITEMDESC. Duplicate tags are ignored. The list of tags for an item can<br>
also be changed via <a href="#Treectrl-item_configure">item_configure</a>(tags=(...)).</tt></dd></dl>
<dl><dt><a name="Treectrl-item_tag_expr"><strong>item_tag_expr</strong></a>(self, itemDesc, tag)</dt><dd><tt>Evaluates the tag expression TAG against every column specified by<br>
the item description ITEMDESC. The result is True if the tag expression<br>
evaluates to true for every item, False otherwise. For example:<br>
<a href="#Treectrl-item_tag_expr">item_tag_expr</a>(itemDesc, 'foo')<br>
returns True if an item has tag "foo". Also:<br>
<a href="#Treectrl-item_tag_expr">item_tag_expr</a>(itemDesc, 'a||b')<br>
returns True if an item has tag "a" or "b".</tt></dd></dl>
<dl><dt><a name="Treectrl-item_tag_names"><strong>item_tag_names</strong></a>(self, itemDesc)</dt><dd><tt>Returns a list of tag names assigned to the items specified by the<br>
item description ITEMDESC. The result is the union of any tags assigned<br>
to the items.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_tag_remove"><strong>item_tag_remove</strong></a>(self, itemDesc, *tags)</dt><dd><tt>Removes each tag in TAGS from the items specified by the item<br>
description ITEMDESC. It is not an error if any of the items do not use<br>
any of the tags. The list of tags for an item can also be changed via<br>
<a href="#Treectrl-item_configure">item_configure</a>(tags=(...).</tt></dd></dl>
<dl><dt><a name="Treectrl-item_text"><strong>item_text</strong></a>(self, itemDesc, *columnAndText)</dt><dd><tt>This command sets or retrieves the value of the -text option for the<br>
first text element in one or more columns. If no COLUMN is specified,<br>
this command returns a list of values, one per column. If no TEXT is<br>
specified, this command returns the value for COLUMN. If one or more<br>
column-text pairs is specified, then the value of the -text option in<br>
each column is set to text. Note that this command is provided as a<br>
convenience. Use the <a href="#Treectrl-itemelement_configure">itemelement_configure</a>() or <a href="#Treectrl-itemelement_cget">itemelement_cget</a>()<br>
commands if you want to set or retrieve the value of the -text option<br>
for a specific text element.</tt></dd></dl>
<dl><dt><a name="Treectrl-item_toggle"><strong>item_toggle</strong></a>(self, itemDesc, recurse<font color="#909090">=False</font>, animate<font color="#909090">=False</font>)</dt><dd><tt>Changes the open state of the item(s) described by ITEMDESC. If the<br>
state is currently switched off, this command does the same as the<br>
<a href="#Treectrl-item_expand">item_expand</a>() widget command, otherwise the same as the <a href="#Treectrl-item_collapse">item_collapse</a>()<br>
widget command. If ANIMATE is specified, then the item's button will<br>
animate as it transitions between states if the theme supports it; in<br>
this case only one item may be specified.ITEMDESC may also be the<br>
string ALL, in which case the state of all items of the treectrl widget<br>
are toggled. If RECURSE is specified, the state of all descendants of<br>
ITEMDESC will also be toggled.</tt></dd></dl>
<dl><dt><a name="Treectrl-itemelement_cget"><strong>itemelement_cget</strong></a>(self, itemDesc, column, element, option)</dt><dd><tt>This command returns the value of the option named OPTION associated<br>
with ELEMENT inside COLUMN of the item described by ITEMDESC, if it<br>
was already configured for the actual item. OPTION may have any of the<br>
values accepted by the type of the specified ELEMENT.</tt></dd></dl>
<dl><dt><a name="Treectrl-itemelement_config"><strong>itemelement_config</strong></a> = <a href="#Treectrl-itemelement_configure">itemelement_configure</a>(self, itemDesc, column, element, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-itemelement_configure"><strong>itemelement_configure</strong></a>(self, itemDesc, column, element, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the configure widget command except that<br>
it modifies options associated with ELEMENT inside COLUMN of the item<br>
described by ITEMDESC instead of modifying options for the overall<br>
treectrl widget. If no option is specified, the command returns a list<br>
describing all of the available options for the element</tt></dd></dl>
<dl><dt><a name="Treectrl-itemelement_perstate"><strong>itemelement_perstate</strong></a>(self, itemDesc, column, element, option, *statelist)</dt><dd><tt>This command returns the current value of the per-state option named<br>
OPTION for ELEMENT inside COLUMN of the item described by ITEMDESC.<br>
If STATELIST is specified, the list of state names (static and dynamic)<br>
is used in place of the current state for ITEM and COLUMN.</tt></dd></dl>
<dl><dt><a name="Treectrl-itemstate_forcolumn"><strong>itemstate_forcolumn</strong></a>(self, itemDesc, column, *statenames)</dt><dd><tt>Just like <a href="#Treectrl-itemstate_set">itemstate_set</a>() but manipulates dynamic states for a<br>
single item column, not the item as a whole. If STATENAME is<br>
unspecified, this command returns a list containing the names of all<br>
the dynamic states which are switched on in COLUMN.</tt></dd></dl>
<dl><dt><a name="Treectrl-itemstate_get"><strong>itemstate_get</strong></a>(self, itemDesc, statename<font color="#909090">=None</font>)</dt><dd><tt>If no STATENAME is specified, returns a list containing the names of<br>
all (static and dynamic) states which are currently switched on for the<br>
item described by ITEMDESC. If a STATENAME is specified, True is<br>
returned if the specified state is currently switched on for the item,<br>
False otherwise.</tt></dd></dl>
<dl><dt><a name="Treectrl-itemstate_set"><strong>itemstate_set</strong></a>(self, first, last, *statenames)</dt><dd><tt>Every element of STATENAMES must be the name of a dynamic state,<br>
optionally preceded by a ~ or ! character. Every state with a<br>
leading ! will be switched off for the item described by FIRST, every<br>
state with a leading ~ will be toggled, and every state without<br>
leading ! or ~ will be switched on. If LAST is specified, the state<br>
changes will be made for all items in the range between FIRST and LAST.<br>
If LAST is set to None, only the state(s) of the item described by<br>
FIRST will be changed. If FIRST is the string ALL, then the state<br>
changes are made for all items of the treectrl widget.</tt></dd></dl>
<dl><dt><a name="Treectrl-itemstyle_elements"><strong>itemstyle_elements</strong></a>(self, itemDesc, column)</dt><dd><tt>This command returns a list containing the names of elements which<br>
were configured by the <a href="#Treectrl-itemelement_configure">itemelement_configure</a>() command for the item<br>
described by ITEMDESC in COLUMN.<br>
If there is no style assigned to COLUMN, None is returned.</tt></dd></dl>
<dl><dt><a name="Treectrl-itemstyle_map"><strong>itemstyle_map</strong></a>(self, itemDesc, column, style, *map)</dt><dd><tt>Like the <a href="#Treectrl-itemstyle_set">itemstyle_set</a>() command, this command may be used to assign<br>
a style to a specific column of an item. Unlike <a href="#Treectrl-itemstyle_set">itemstyle_set</a>(), this<br>
command can transfer configuration values of elements in the current<br>
style to elements in the new style specified by STYLE. MAP must be a<br>
list of elementOld-elementNew pairs, where elementOld is an element in<br>
the current style, and elementNew is an element in the style specified<br>
by style. Both elementOld and elementNew must be of the same<br>
type (bitmap, text etc).</tt></dd></dl>
<dl><dt><a name="Treectrl-itemstyle_set"><strong>itemstyle_set</strong></a>(self, itemDesc, *columnAndStyle)</dt><dd><tt>This command sets or retrieves the style assigned to one or more<br>
columns. If no COLUMN is specified, this command returns a tuple<br>
containing the names of the styles set for all columns of the item<br>
described by ITEMDESC. If no STYLE is specified, this command returns<br>
the name of the style set for the item described by ITEMDESC in COLUMN.<br>
If one or more column-style pairs is specified, then the style in each<br>
column is set to style.</tt></dd></dl>
<dl><dt><a name="Treectrl-marquee_anchor"><strong>marquee_anchor</strong></a>(self, x<font color="#909090">=None</font>, y<font color="#909090">=None</font>)</dt><dd><tt>Returns a list containing the x and y coordinates of the anchor, if<br>
no additional arguments are specified. If two coordinates are<br>
specified, sets the anchor to the given coordinates X and Y.</tt></dd></dl>
<dl><dt><a name="Treectrl-marquee_cget"><strong>marquee_cget</strong></a>(self, option)</dt><dd><tt>This command returns the current value of the marquee option named<br>
OPTION. OPTION may have any of the values accepted by the<br>
<a href="#Treectrl-marquee_configure">marquee_configure</a>() widget command.</tt></dd></dl>
<dl><dt><a name="Treectrl-marquee_configure"><strong>marquee_configure</strong></a>(self, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the <a href="#Treectrl-configure">configure</a>() widget command except<br>
that it modifies the marquee options instead of modifying options for<br>
the overall treectrl widget.<br>
The following marquee options are supported:<br>
-fill<br>
Specifies the fill color for the selection rectangle. The value can<br>
be a Tk color or a gradient name or an empty string (the default).<br>
When this option isn't an empty string the dotted outline is not<br>
drawn. By specifying the name of a semi-transparent gradient a<br>
modern-looking selection rectangle can be achieved.<br>
-outline<br>
Specifies the outline color for the selection rectangle. The value<br>
can be a Tk color, a gradient name, or an empty string which is the<br>
default. When this option isn't an empty string the dotted outline<br>
is not drawn.<br>
-visible boolean<br>
Specifies a boolean value which determines whether the dotted line<br>
surrounding the region of the marquee should currently be visible.</tt></dd></dl>
<dl><dt><a name="Treectrl-marquee_coords"><strong>marquee_coords</strong></a>(self, x1<font color="#909090">=None</font>, y1<font color="#909090">=None</font>, x2<font color="#909090">=None</font>, y2<font color="#909090">=None</font>)</dt><dd><tt>Returns a list containing the x and y coordinates of the anchor<br>
followed by the x and y coordinates of the corner, if no additional<br>
arguments are specified. If four coordinates are specified, sets the<br>
anchor to the given coordinates x1 and y1 and the corner to the<br>
coordinates x2 and y2.</tt></dd></dl>
<dl><dt><a name="Treectrl-marquee_corner"><strong>marquee_corner</strong></a>(self, x<font color="#909090">=None</font>, y<font color="#909090">=None</font>)</dt><dd><tt>Returns a list containing the x and y coordinates of the corner,<br>
if no additional arguments are specified. If two coordinates are<br>
specified, sets the corner to the given coordinates x and y.</tt></dd></dl>
<dl><dt><a name="Treectrl-marquee_identify"><strong>marquee_identify</strong></a>(self)</dt><dd><tt>Returns a list with information about the items inside the marquee.<br>
The list has as elements a list itself for every item which is<br>
displayed inside the marquee. The first element of these lists is the<br>
numerical item id, followed by another list with information about<br>
every column of the item inside the marque. These lists start with the<br>
column number, followed by the elements of the style defined for the<br>
item in this column if there are any.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_bind"><strong>notify_bind</strong></a>(self, sequence<font color="#909090">=None</font>, func<font color="#909090">=None</font>, object<font color="#909090">=None</font>, add<font color="#909090">=None</font>)</dt><dd><tt>This command associates Tcl scripts with events generated by a<br>
treectrl widget. If all three arguments are specified, <a href="#Treectrl-notify_bind">notify_bind</a>()<br>
will arrange for FUNC to be evaluated whenever the event(s) specified<br>
by SEQUENCE are generated by this treectrl widget. If ADD is True,<br>
then it is appended to any existing binding for SEQUENCE; otherwise<br>
FUNC replaces any existing binding. If FUNC is an empty string, then<br>
the current binding for SEQUENCE is destroyed, leaving SEQUENCE<br>
unbound. If SEQUENCE is specified without a FUNC, then the script<br>
currently bound to SEQUENCE is returned, or an empty string is returned<br>
if there is no binding for SEQUENCE. If neither SEQUENCE nor FUNC is<br>
specified, then the return value is a list whose elements are all the<br>
patterns for which there exist bindings for object. The OBJECT argument<br>
determines which window(s) the binding applies to. If OBJECT begins<br>
with a dot, as in .a.b.c, then it must be the path name for a window;<br>
otherwise it may be an arbitrary string. Like the regular bind command,<br>
bindings on window names are automatically removed if that window is<br>
destroyed.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_config"><strong>notify_config</strong></a> = <a href="#Treectrl-notify_configure">notify_configure</a>(self, object, sequence, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-notify_configure"><strong>notify_configure</strong></a>(self, object, sequence, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command sets and retrieves options for bindings created by the<br>
<a href="#Treectrl-notify_bind">notify_bind</a>() command. If no option is specified, the command returns<br>
a list with option-value pairs describing all the available binding<br>
options for SEQUENCE on OBJECT. If option is specified with no value,<br>
then the command returns the current value of that option. If one or<br>
more option-value pairs are specified, then the command modifies the<br>
given option(s) to have the given value(s) for the binding; in this<br>
case the command returns an empty string.<br>
The following binding options are supported:<br>
-active boolean<br>
Specifies if the binding should be active. As long as this option<br>
is specified as false, a binding script will not be evaluated<br>
when the corresponding event is generated.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_detailnames"><strong>notify_detailnames</strong></a>(self, eventname)</dt><dd><tt>Returns a list containing the names of all details, which are<br>
installed for the event with the name EVENTNAME by means of the<br>
<a href="#Treectrl-notify_install">notify_install</a>() widget command or by the treectrl widget itself.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_eventnames"><strong>notify_eventnames</strong></a>(self)</dt><dd><tt>Returns a list containing the names of all events, which are<br>
installed by means of the <a href="#Treectrl-notify_install">notify_install</a>() widget command or by the<br>
treectrl widget itself.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_generate"><strong>notify_generate</strong></a>(self, sequence, charmap<font color="#909090">=None</font>, percentscommand<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command causes the treectrl widget to generate an event. This<br>
command is typically used to generate dynamic events created by the<br>
<a href="#Treectrl-notify_install">notify_install</a>() command, but may be used to generate static events<br>
also. The event specified by SEQUENCE is generated, and any active<br>
binding scripts on the event are evaluated after undergoing<br>
%-substitution. If there are details defined for the event, SEQUENCE<br>
must describe an <eventName-detail> pair, otherwise SEQUENCE should<br>
be <eventName>. The optional CHARMAP is a tuple of char-value pairs.<br>
Each char has to be exactly one character. The charMap is used in<br>
%-substitution. If PERCENTSCOMMAND is specified, then it will be used<br>
to perform %-substitution on any scripts bound to the event. If<br>
PERCENTSCOMMAND is not specified and the event is dynamic, then the<br>
%-subtitution command passed to <a href="#Treectrl-notify_install">notify_install</a>() will be used if it was<br>
provided. If the event is static or no %-substitution command is<br>
available, then all %-substitution is done using CHARMAP only . See<br>
<a href="#Treectrl-notify_install">notify_install</a>() for a description of PERCENTSCOMMAND. If no CHARMAP is<br>
specified, a default charmap will be created, that contains information<br>
about the widget and the event pattern, plus optional information<br>
provided by keyword-value pairs; any of the attributes of a<br>
<a href="#TreectrlEvent">TreectrlEvent</a> instance as created by a <a href="#Treectrl-notify_bind">notify_bind</a>() callback is<br>
accepted as keyword argument.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_install"><strong>notify_install</strong></a>(self, sequence, percentscommand<font color="#909090">=None</font>)</dt><dd><tt>This command installs a new event or detail specified by SEQUENCE.<br>
Events created by this command are called dynamic, whereas events<br>
created by the treectrl widget itself are called static. This command<br>
may be called to set or retrieve the PERCENTSCOMMAND for an existing<br>
dynamic event. The optional PERCENTSCOMMAND is a list containing the<br>
name of a Tcl command, plus any optional arguments, to which five<br>
additional arguments will be appended. The command will be called to<br>
perform %-substitution on any scripts bound to the event specified by<br>
SEQUENCE. <a href="#Treectrl-notify_install">notify_install</a>() returns the current PERCENTSCOMMAND for the<br>
event, or an error if the event is not dynamic.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_linkage"><strong>notify_linkage</strong></a>(self, sequence)</dt><dd><tt>Returns a string indicating whether the specified event or detail<br>
is created by means of the <a href="#Treectrl-notify_install">notify_install</a>() widget command (dynamic)<br>
or by the treectrl widget itself (static).</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_unbind"><strong>notify_unbind</strong></a>(self, object, sequence<font color="#909090">=None</font>)</dt><dd><tt>If no SEQUENCE is specified, all bindings on OBJECT are removed.<br>
If SEQUENCE is specified, then the current binding for SEQUENCE is<br>
destroyed, leaving SEQUENCE unbound.</tt></dd></dl>
<dl><dt><a name="Treectrl-notify_uninstall"><strong>notify_uninstall</strong></a>(self, sequence)</dt><dd><tt>If the event or detail specified by SEQUENCE is static (i.e. created<br>
by the treectrl widget itself), an error is generated. Otherwise the<br>
dynamic event or detail is removed. If an event name is specified<br>
without a detail, all details for that event are also removed.</tt></dd></dl>
<dl><dt><a name="Treectrl-orphans"><strong>orphans</strong></a>(self)</dt><dd><tt>Returns a list containing the item ids of all items which have no<br>
parent. When an item is created, it has no parent by default, and can<br>
later become an orphan by means of the <a href="#Treectrl-item_remove">item_remove</a>() widget command.<br>
The root item is not returned.</tt></dd></dl>
<dl><dt><a name="Treectrl-see"><strong>see</strong></a>(self, itemDesc, column<font color="#909090">=None</font>, center<font color="#909090">=None</font>)</dt><dd><tt>Adjust the view in the treectrl so that the item described by<br>
ITEMDESC is visible. If the item is already visible then the command<br>
has no effect; otherwise the treectrl scrolls to bring the item into<br>
view, and the corresponding <Scroll-x> and/or <Scroll-y> events are<br>
generated. If COLUMN is specified then a specific column of the item<br>
is scrolled into view instead of the entire item.<br>
CENTER may be a string that contains zero or more of the characters<br>
"x" or "y". This option is used to center the item horizontally and/or<br>
vertically in the window. The item will be centered regardless of<br>
whether it is already visible.</tt></dd></dl>
<dl><dt><a name="Treectrl-selection_add"><strong>selection_add</strong></a>(self, first, last<font color="#909090">=None</font>)</dt><dd><tt>FIRST and LAST (if specified) must be the string ALL or a valid<br>
item description. Adds every unselected item in the range between<br>
FIRST and LAST, inclusive, to the selection without affecting the<br>
selection state of items outside that range. If one of the arguments<br>
is the string ALL, every unselected item in the treectrl widget is<br>
added to the selection. A <Selection> event is generated if any<br>
items were added to the selection.</tt></dd></dl>
<dl><dt><a name="Treectrl-selection_anchor"><strong>selection_anchor</strong></a>(self, itemDesc<font color="#909090">=None</font>)</dt><dd><tt>If ITEMDESC is specified, the selection anchor is set to the<br>
described item. The selection anchor is the end of the selection that<br>
is fixed while dragging out a selection with the mouse. The item<br>
description anchor may be used to refer to the anchor item. This<br>
command doesn't modify the selection state of any item. Returns the<br>
numerical id of the selection anchor item.</tt></dd></dl>
<dl><dt><a name="Treectrl-selection_clear"><strong>selection_clear</strong></a>(self, first<font color="#909090">=None</font>, last<font color="#909090">=None</font>)</dt><dd><tt>FIRST and LAST (if specified) must be the string ALL or a valid<br>
item description. If any of the items between FIRST and LAST<br>
(inclusive) are selected, they are deselected. The selection state is<br>
not changed for items outside this range. If no additional arguments<br>
are given, or if one of the arguments is the string ALL, then all<br>
items are removed from the selection. A <Selection> event is<br>
generated if any items were removed from the selection.</tt></dd></dl>
<dl><dt><a name="Treectrl-selection_count"><strong>selection_count</strong></a>(self)</dt><dd><tt>Returns an integer indicating the number of items in the treectrl<br>
that are currently selected.</tt></dd></dl>
<dl><dt><a name="Treectrl-selection_get"><strong>selection_get</strong></a>(self, first<font color="#909090">=None</font>, last<font color="#909090">=None</font>)</dt><dd><tt>Returns a tuple containing the item ids of all of the items in the<br>
treectrl that are currently selected. If there are no items selected<br>
in the treectrl, returns None. The optional arguments FIRST and LAST<br>
are treated as indices into the sorted list of selected items.<br>
For example:<br>
<a href="#Treectrl-selection_get">selection_get</a>(0) : the first selected item<br>
<a href="#Treectrl-selection_get">selection_get</a>("end") : the last selected item<br>
<a href="#Treectrl-selection_get">selection_get</a>(1, "end-1") : every selected item except<br>
the first and last</tt></dd></dl>
<dl><dt><a name="Treectrl-selection_includes"><strong>selection_includes</strong></a>(self, itemDesc)</dt><dd><tt>Returns True if the item described by itemDesc is currently<br>
selected, False if it isn't.</tt></dd></dl>
<dl><dt><a name="Treectrl-selection_modify"><strong>selection_modify</strong></a>(self, select<font color="#909090">=()</font>, deselect<font color="#909090">=()</font>)</dt><dd><tt>Both arguments SELECT and DESELECT must be the string ALL or a<br>
possibly-empty list of item descriptions. Any unselected items in<br>
SELECT are added to the selection, and any selected items in DESELECT<br>
are removed from the selection (except for those items which are also<br>
in SELECT). A <Selection> event is generated if any items were<br>
selected or deselected.</tt></dd></dl>
<dl><dt><a name="Treectrl-set_dragimage"><strong>set_dragimage</strong></a>(self, *args)</dt><dd><tt>This command may be used to define elements that should be drawn<br>
as drag images during drag operations.<br>
ARGS must be one or more tuples of the form (COLUMN, STYLE, ELEMENT)<br>
that define the elements that are supposed to be drawn.<br>
For this to take effect, at least calls to<br>
<a href="#Treectrl-bindtags">bindtags</a>(('TreeCtrlFileList',)) and <a href="#Treectrl-set_sensitive">set_sensitive</a>(*args)<br>
must be made before.</tt></dd></dl>
<dl><dt><a name="Treectrl-set_editable"><strong>set_editable</strong></a>(self, *args)</dt><dd><tt>This command may be used to define text cells that should be<br>
user-editable. ARGS must be one or more tuples of the form<br>
(COLUMN, STYLE, ELEMENT) that define the text elements that are<br>
supposed to be editable. For this to take effect, at least calls to<br>
<a href="#Treectrl-bindtags">bindtags</a>(('TreeCtrlFileList',)) and <a href="#Treectrl-set_sensitive">set_sensitive</a>(*args)<br>
must be made before.</tt></dd></dl>
<dl><dt><a name="Treectrl-set_selected_items_sensitive"><strong>set_selected_items_sensitive</strong></a>(self, sensitive)</dt><dd><tt>Specifies whether or not entire items are sensitive to mouse clicks<br>
when they are already selected. SENSITIVE must be a boolean value.</tt></dd></dl>
<dl><dt><a name="Treectrl-set_sensitive"><strong>set_sensitive</strong></a>(self, *args)</dt><dd><tt>Defines elements that are supposed to respond to mouse events<br>
after file list bindings have been applied to the widget with<br>
<a href="#Treectrl-bindtags">bindtags</a>(('TreeCtrlFileList',)). ARGS must be one or more tuples of<br>
the form (COLUMN, STYLE, ELEMENT) that define the desired elements.</tt></dd></dl>
<dl><dt><a name="Treectrl-set_sensitive_marquee"><strong>set_sensitive_marquee</strong></a>(self, *args)</dt><dd><tt>Just like <a href="#Treectrl-set_sensitive">set_sensitive</a>() but indicates which elements respond to<br>
the selection rectangle. Typically this is the same as the elements<br>
passed to <a href="#Treectrl-set_sensitive">set_sensitive</a>() with the addition of the selection rectangle<br>
elements.</tt></dd></dl>
<dl><dt><a name="Treectrl-state_define"><strong>state_define</strong></a>(self, statename)</dt><dd><tt>Defines a new state with the name STATENAME, which must not be the<br>
name of an existing state.</tt></dd></dl>
<dl><dt><a name="Treectrl-state_linkage"><strong>state_linkage</strong></a>(self, statename)</dt><dd><tt>Returns a string indicating whether the specified state is<br>
user-defined by means of the <a href="#Treectrl-state_define">state_define</a>() widget command (dynamic)<br>
or predefined by the treectrl widget itself (static).</tt></dd></dl>
<dl><dt><a name="Treectrl-state_names"><strong>state_names</strong></a>(self)</dt><dd><tt>Returns a list containing the names of all user-defined states.</tt></dd></dl>
<dl><dt><a name="Treectrl-state_undefine"><strong>state_undefine</strong></a>(self, statename)</dt><dd><tt>STATENAME must be the name of a user-defined state. Removes this<br>
state from the list of user-defined states.</tt></dd></dl>
<dl><dt><a name="Treectrl-style_cget"><strong>style_cget</strong></a>(self, style, option)</dt><dd><tt>This command returns the current value of the option named OPTION<br>
associated with the style given by STYLE. OPTION may have any of the<br>
values accepted by the <a href="#Treectrl-style_configure">style_configure</a>() widget command.</tt></dd></dl>
<dl><dt><a name="Treectrl-style_config"><strong>style_config</strong></a> = <a href="#Treectrl-style_configure">style_configure</a>(self, style, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="Treectrl-style_configure"><strong>style_configure</strong></a>(self, style, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the <a href="#Treectrl-configure">configure</a>() widget command except<br>
that it modifies options associated with the style given by STYLE<br>
instead of modifying options for the overall treectrl widget. The<br>
options of a style have effect on all elements managed by the style.<br>
The following options are supported:<br>
-buttony offset<br>
Specifies the distance from the top of the item that the<br>
expand/collapse button should be drawn. If offset is an empty<br>
string (the default) then the button is centered vertically in<br>
the item. The value may have any of the forms acceptable to<br>
Tk_GetPixels. This option only has effect when the style is<br>
set in an item in the tree column.<br>
-orient varName<br>
This option specifies which orientation should be used when<br>
laying out the elements associated with this style.<br>
Must be either horizontal (the default) or vertical or an<br>
abbreviation of one of these.</tt></dd></dl>
<dl><dt><a name="Treectrl-style_create"><strong>style_create</strong></a>(self, name<font color="#909090">=None</font>, *args, **kw)</dt><dd><tt>Create a new style in pathName with name STYLE. After STYLE there<br>
may be any number of option-value pairs, each of which sets one of the<br>
configuration options for the style. These same option-value pairs may<br>
be used in <a href="#Treectrl-style_configure">style_configure</a>() widget commands to change the style's<br>
configuration. Returns the name of the new style.</tt></dd></dl>
<dl><dt><a name="Treectrl-style_delete"><strong>style_delete</strong></a>(self, style)</dt><dd><tt>Deletes each of the named STYLEs. If a style is deleted while it is<br>
still used to display one or more items, it is also removed from the<br>
style list of these items.</tt></dd></dl>
<dl><dt><a name="Treectrl-style_elements"><strong>style_elements</strong></a>(self, style, *elementList)</dt><dd><tt>Specifies the elements which should be layed out by this style.<br>
Each element of ELEMENTLIST must be the name of an element created by<br>
the widget command <a href="#Treectrl-element_create">element_create</a>(). Duplicate names in ELEMENTLIST<br>
are ignored. An element which was specified in a former call of this<br>
command for STYLE but is not included in ELEMENTLIST, will be deleted<br>
from the elements layed out by STYLE. If the ELEMENTLIST argument is<br>
not specified, a list is returned containing the currently defined<br>
elements of STYLE.</tt></dd></dl>
<dl><dt><a name="Treectrl-style_layout"><strong>style_layout</strong></a>(self, style, element, cnf<font color="#909090">=None</font>, **kw)</dt><dd><tt>This command is similar to the <a href="#Treectrl-configure">configure</a>() widget command except<br>
that it modifies options used by STYLE for laying out ELEMENT instead<br>
of modifying options for the overall treectrl widget. The options of a<br>
layout have effect on exactly the one element ELEMENT managed by STYLE.<br>
The following options are supported:<br>
-detach boolean<br>
Specifies whether the element should be positioned by itself,<br>
i.e. independent from the other elements.<br>
-expand flags<br>
This option allows the external padding around the element to<br>
increase when a style has more screen space than it needs. Flags<br>
is a string that contains zero or more of the characters n, s, w<br>
or e. Each letter refers to the padding on the top, bottom, left,<br>
or right that should be allowed to increase. This option is<br>
typically used to justify an element.<br>
-iexpand flags<br>
This option allows the internal padding of the element and the<br>
display area of the element to increase when a style has more<br>
screen space than it needs. Flags is a string that contains zero<br>
or more of the characters x, y, n, s, w or e. For n, s, w and e,<br>
each letter refers to the padding on the top, bottom, left, or<br>
right that should be allowed to increase. For x and y, each letter<br>
refers to the horizontal and vertical screen space the element can<br>
display itself in (i.e., the space between the padding). Note that<br>
if the -union option is specified for this element, then the x and<br>
y flags have no effect, since the size of an element with -union<br>
layout is determined by the elements it surrounds.<br>
-indent boolean<br>
Specifies whether the element should be positioned to the right of<br>
the button/line area in the tree column.<br>
This option is ignored unless the -detach option is true.<br>
-ipadx amount<br>
-ipady amount<br>
Amount specifies how much internal padding to leave on the left<br>
and right (for -ipadx) or top and bottom (for -ipady) side of the<br>
element. Amount may be a list of two values to specify padding for<br>
the two sides separately, it defaults to 0.<br>
-minheight pixels<br>
-height pixels<br>
-maxheight pixels<br>
Specifies the minimum, fixed, and maximum height of the element.<br>
-minwidth pixels<br>
-width pixels<br>
-maxwidth pixels<br>
Specifies the minimum, fixed, and maximum width of the element.<br>
-padx amount<br>
-pady amount<br>
Amount specifies how much external padding to leave on the left<br>
and right (for -padx) or top and bottom (for -pady) side of the<br>
element. Amount may be a list of two values to specify padding<br>
for the two sides separately, it defaults to 0.<br>
-squeeze flags<br>
This option allows the display area of an element to decrease when<br>
a style has less space than it needs. Flags is a string that<br>
contains zero or more of the characters x or y. x allows display<br>
area to decrease horizontally, y allows display area to decrease<br>
vertically. This option is typically used for text elements and<br>
will cause the text element to display an ellipsis (...) and/or<br>
wrap lines.<br>
-sticky flags<br>
This option controls how the actual display information<br>
(image, text, etc) of an element is positioned (or stretched)<br>
within its display area. Flags is a string that contains zero<br>
or more of the characters n, s, w or e. Each letter refers to<br>
the top, bottom, left or right side of the display area that<br>
the display information should "stick" to.<br>
-union elementList<br>
Specifies a list of other elements which this element will<br>
surround. The size of an element with -union layout is determined<br>
by the size and position of the elements in elementList. The<br>
-ipadx and -ipady options in this case refer to the distance of<br>
the edges of the display area of this element from those elements<br>
it surrounds. This option is typically used to display a<br>
selection rectangle around a piece of text.<br>
Since treectrl-2.3 it is ok to include an element with -union<br>
layout in another element's -union list.<br>
Previously, nesting -union elements had undefined behavior.</tt></dd></dl>
<dl><dt><a name="Treectrl-style_names"><strong>style_names</strong></a>(self)</dt><dd><tt>Returns a list containing the names of all existing styles.</tt></dd></dl>
<dl><dt><a name="Treectrl-theme_platform"><strong>theme_platform</strong></a>(self)</dt><dd><tt>Returns the API used to draw themed parts of the treectrl.<br>
On Mac OS X the result is always aqua. On MS Windows the result is<br>
visualstyles if the uxtheme.dll was loaded and visual themes are<br>
in use, otherwise X11 is returned to indicate the Tk Xlib calls are<br>
drawing the themed parts. On Unix systems the result is gtk if the<br>
Gtk+ version of treectrl was built, otherwise X11 is returned.</tt></dd></dl>
<dl><dt><a name="Treectrl-theme_setwindowtheme"><strong>theme_setwindowtheme</strong></a>(self, appname)</dt><dd><tt>The command is available on MS Windows only. If appname is<br>
"Explorer" then the item buttons look like those in the Explorer file<br>
browser (disclosure triangles under Windows Vista/7). If appname is an<br>
empty string then the buttons revert to their default appearance<br>
according to the system's current visual style.</tt></dd></dl>
<dl><dt><a name="Treectrl-xview"><strong>xview</strong></a>(self, *what)</dt><dd><tt>Query and change horizontal position of the view.</tt></dd></dl>
<dl><dt><a name="Treectrl-xview_moveto"><strong>xview_moveto</strong></a>(self, fraction)</dt><dd><tt>Adjust the view in the window so that FRACTION of the<br>
total width of the entry is off-screen to the left.</tt></dd></dl>
<dl><dt><a name="Treectrl-xview_scroll"><strong>xview_scroll</strong></a>(self, number, what)</dt><dd><tt>Shift the x-view according to NUMBER which is measured in<br>
"units" or "pages" (WHAT).</tt></dd></dl>
<dl><dt><a name="Treectrl-yview"><strong>yview</strong></a>(self, *what)</dt><dd><tt>Query and change vertical position of the view.</tt></dd></dl>
<dl><dt><a name="Treectrl-yview_moveto"><strong>yview_moveto</strong></a>(self, fraction)</dt><dd><tt>Adjust the view in the window so that FRACTION of the<br>
total width of the entry is off-screen to the top.</tt></dd></dl>
<dl><dt><a name="Treectrl-yview_scroll"><strong>yview_scroll</strong></a>(self, number, what)</dt><dd><tt>Shift the y-view according to NUMBER which is measured in<br>
"units" or "pages" (WHAT).</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="TreectrlEvent">class <strong>TreectrlEvent</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Container for the properties of an event.<br>
This is very similar to a tkinter.Event, except that it holds a different<br>
set of attributes. Instances of this type are generated if one of the<br>
static or dynamic treectrl events occurs.<br>
<br>
Static, i.e. installed into the widget by default, events include:<br>
<br>
<ActiveItem>: Generated whenever the active item changes.<br>
<Collapse-before>: Generated before an item is collapsed.<br>
<Collapse-after>: Generated after an item is collapsed.<br>
<Expand-before>: Generated before an item is expanded. This event is useful<br>
if you want to add child items to the item just before the<br>
item is expanded.<br>
<Expand-after>: Generated after an item is expanded.<br>
<ItemDelete>: Generated when items are about to be deleted by the<br>
item_delete() command.<br>
<ItemVisibility>: Generated when items become visible on screen and when<br>
items are no longer visible on screen. This event is<br>
useful if you have a very large number of items and want<br>
to assign styles only when items are actually going to be<br>
displayed.<br>
<Scroll-x>: Generated whenever the view in the treectrl changes in such a<br>
way that a horizontal scrollbar should be redisplayed.<br>
<Scroll-y>: Generated whenever the view in the treectrl changes in such a<br>
way that a vertical scrollbar should be redisplayed.<br>
<Selection>: Generated whenever the selection changes. This event gives<br>
information about how the selection changed.<br>
<br>
In addition to the pre-defined static events such as <ActiveItem> and<br>
<Selection>, new dynamic events can be created by using the<br>
notify_install() command.<br>
The following events may be generated by the library scripts:<br>
<br>
<ColumnDrag-begin><br>
<ColumnDrag-receive><br>
<ColumnDrag-end>: Generated whenever the user drag-and-drops a column<br>
header. The library scripts do not actually move a<br>
dragged column. You must bind to the receive event to<br>
move the column.<br>
<ColumnDrag-indicator>: generated whenever the place to drop a dragged<br>
column header is updated.<br>
<Drag-begin><br>
<Drag-receive><br>
<Drag-end>: Generated whenever the user drag-and-drops a file into a<br>
directory. This event is generated by the filelist-bindings.tcl<br>
library code, which is not used by default.<br>
<Edit-begin><br>
<Edit-accept><br>
<Edit-end>: The filelist-bindings.tcl code will display a text-editing<br>
window if the user clicks on a selected file/folder name.<br>
<Header-invoke>: Generated whenever the user clicks and releases the left<br>
mouse button in a column header if the column's -button<br>
option is true.<br>
You can bind a callback to this event to sort the list.<br>
<Header-state>: generated whenever the state of an individual column<br>
header is changed during mouse-pointer events.<br>
<br>
If a callback function for one of these events is registered using<br>
notify_bind(), the callback is called with a <a href="#TreectrlEvent">TreectrlEvent</a> as first<br>
argument. It will have the following attributes (in braces are the event<br>
types for which the attribute is valid):<br>
<br>
detail - the detail name, e.g "after" if the event is "<Expand-after>"<br>
(all static events).<br>
name - the event name, e.g "Expand" if the event is "<Expand-after>"<br>
(all static events).<br>
pattern - the complete event pattern, either "<name>" or "<name-detail>"<br>
(all static events).<br>
object - The object argument to the notify_bind() command<br>
(all static events).<br>
widget - The treectrl widget which generated the event (all static events).<br>
<br>
item - The item id (<Collapse>, <Expand>, <Drag>, <Edit> events).<br>
<br>
active - The current active item (<ActiveItem> events).<br>
prevactive - The previous active item (<ActiveItem> events).<br>
<br>
deleteditems - List of items ids being deleted (<ItemDelete> events).<br>
<br>
visible- List of items ids which are now visible (<ItemVisibility> events).<br>
nonvisible - List of items ids which are no longer visible<br>
(<ItemVisibility> events).<br>
<br>
lower - Same as the first fraction appended to -yscrollcommand<br>
(<Scroll> events).<br>
upper - Same as the second fraction appended to -yscrollcommand<br>
(<Scroll> events).<br>
<br>
selectcount - Same as the selection_count() widget command<br>
(<Selection> events).<br>
deselected - List of newly-deselected item ids (<Selection> events).<br>
selected - List of newly-selected item ids (<Selection> events).<br>
<br>
textelement - The name of the edited text element (<Edit> events).<br>
text - The edited text (<Edit> events).<br>
<br>
column - The column that was dragged or whose header was clicked<br>
(<ColumnDrag>, <Header-invoke>, <Edit> events).<br>
<br>
columnbefore - The column to move the dragged column before<br>
(<ColumnDrag> events).<br>
<br>
draggeditems - The list of dragged items (<Drag> events).<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>__package__</strong> = None</td></tr></table>
</body></html>
|