This file is indexed.

/usr/lib/treectrl2.2.8/htmldoc/treectrl.html is in tktreectrl 2.2.8-1ubuntu1.

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
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
<! -- Copyright (c) 2002-2003 Christian Krone.   --    --   See the file &quot;license.terms&quot; for information on usage and redistribution   --   of this file, and for a DISCLAIMER OF ALL WARRANTIES.   --    --   $Id: treectrl.html,v 1.57 2008/10/08 19:48:50 treectrl Exp $
   -->
<html><head>
<title>treectrl - Tk Commands </title>
</head>
<! -- Generated from file 'doc/treectrl.man' by tcllib/doctools with format 'html'
   -->
<! -- CVS: $Id: treectrl.html,v 1.57 2008/10/08 19:48:50 treectrl Exp $ treectrl.n
   -->

<body>
<h1> treectrl(n) 2.2.8 treectrl &quot;Tk Commands&quot;</h1>
<h2><a name="name">NAME</a></h2>
<p>
<p> treectrl - Create and manipulate hierarchical multicolumn widgets




<h2><a name="table_of_contents">TABLE OF CONTENTS</a></h2>
<p>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#table_of_contents">TABLE OF CONTENTS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#synopsis">SYNOPSIS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#description">DESCRIPTION</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#standard_options">STANDARD OPTIONS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#widget_specific_options">WIDGET SPECIFIC OPTIONS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#item_and_column_tags">ITEM AND COLUMN TAGS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#widget_command">WIDGET COMMAND</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#columns">COLUMNS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#column_description">COLUMN DESCRIPTION</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#states">STATES</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#per-state_options">PER-STATE OPTIONS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#elements">ELEMENTS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#bitmap_element">BITMAP ELEMENT</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#border_element">BORDER ELEMENT</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#image_element">IMAGE ELEMENT</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#rectangle_element">RECTANGLE ELEMENT</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#text_element">TEXT ELEMENT</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#window_element">WINDOW ELEMENT</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#item_description">ITEM DESCRIPTION</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#events_and_script_substitutions">EVENTS AND SCRIPT SUBSTITUTIONS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#dynamic_events">DYNAMIC EVENTS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#default_bindings">DEFAULT BINDINGS</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#examples">EXAMPLES</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#see_also">SEE ALSO</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#keywords">KEYWORDS</a><br>
<h2><a name="synopsis">SYNOPSIS</a></h2>
<p>
package require <b>treectrl 2.2.8</b><br>
<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>treectrl</b> <i class='arg'>pathName</i> ?<i class='arg'>options</i>?</a></td></tr>
<tr valign=top ><td ><a href="#2"><i class='arg'>pathName</i> <b class='cmd'>activate</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#3"><i class='arg'>pathName</i> <b class='cmd'>bbox</b> ?<i class='arg'>area</i>?</a></td></tr>
<tr valign=top ><td ><a href="#4"><i class='arg'>pathName</i> <b class='cmd'>canvasx</b> <i class='arg'>screenx</i></a></td></tr>
<tr valign=top ><td ><a href="#5"><i class='arg'>pathName</i> <b class='cmd'>canvasy</b> <i class='arg'>screeny</i></a></td></tr>
<tr valign=top ><td ><a href="#6"><i class='arg'>pathName</i> <b class='cmd'>cget</b> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#7"><i class='arg'>pathName</i> <b class='cmd'>collapse</b> ?<strong>-recurse</strong>? ?<i class='arg'>itemDesc ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#8"><i class='arg'>pathName</i> <b class='cmd'>column</b> <i class='arg'>option</i> <i class='arg'>column</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#9"><i class='arg'>pathName</i> <b class='cmd'>column bbox</b> <i class='arg'>columnDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#10"><i class='arg'>pathName</i> <b class='cmd'>column cget</b> <i class='arg'>columnDesc</i> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#11"><i class='arg'>pathName</i> <b class='cmd'>column configure</b> <i class='arg'>columnDesc</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#12"><i class='arg'>pathName</i> <b class='cmd'>column compare</b> <i class='arg'>column1</i> <i class='arg'>op</i> <i class='arg'>column2</i></a></td></tr>
<tr valign=top ><td ><a href="#13"><i class='arg'>pathName</i> <b class='cmd'>column count</b> ?<i class='arg'>columnDesc</i>?</a></td></tr>
<tr valign=top ><td ><a href="#14"><i class='arg'>pathName</i> <b class='cmd'>column create</b> ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#15"><i class='arg'>pathName</i> <b class='cmd'>column delete</b> <i class='arg'>first</i> ?<i class='arg'>last</i>?</a></td></tr>
<tr valign=top ><td ><a href="#16"><i class='arg'>pathName</i> <b class='cmd'>column dragcget</b> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#17"><i class='arg'>pathName</i> <b class='cmd'>column dragconfigure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#18"><i class='arg'>pathName</i> <b class='cmd'>column index</b> <i class='arg'>columnDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#19"><i class='arg'>pathName</i> <b class='cmd'>column id</b> <i class='arg'>columnDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#20"><i class='arg'>pathName</i> <b class='cmd'>column list</b> ?<i class='arg'>-visible</i>?</a></td></tr>
<tr valign=top ><td ><a href="#21"><i class='arg'>pathName</i> <b class='cmd'>column move</b> <i class='arg'>columnDesc</i> <i class='arg'>beforeDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#22"><i class='arg'>pathName</i> <b class='cmd'>column neededwidth</b> <i class='arg'>columnDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#23"><i class='arg'>pathName</i> <b class='cmd'>column order</b> <i class='arg'>columnDesc</i> ?<i class='arg'>-visible</i>?</a></td></tr>
<tr valign=top ><td ><a href="#24"><i class='arg'>pathName</i> <b class='cmd'>column tag</b> <i class='arg'>option</i> ?<i class='arg'>arg arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#25"><i class='arg'>pathName</i> <b class='cmd'>column tag add</b> <i class='arg'>columnDesc</i> <i class='arg'>tagList</i></a></td></tr>
<tr valign=top ><td ><a href="#26"><i class='arg'>pathName</i> <b class='cmd'>column tag expr</b> <i class='arg'>columnDesc</i> <i class='arg'>tagExpr</i></a></td></tr>
<tr valign=top ><td ><a href="#27"><i class='arg'>pathName</i> <b class='cmd'>column tag names</b> <i class='arg'>columnDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#28"><i class='arg'>pathName</i> <b class='cmd'>column tag remove</b> <i class='arg'>columnDesc</i> <i class='arg'>tagList</i></a></td></tr>
<tr valign=top ><td ><a href="#29"><i class='arg'>pathName</i> <b class='cmd'>column width</b> <i class='arg'>columnDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#30"><i class='arg'>pathName</i> <b class='cmd'>compare</b> <i class='arg'>itemDesc1</i> <i class='arg'>op</i> <i class='arg'>itemDesc2</i></a></td></tr>
<tr valign=top ><td ><a href="#31"><i class='arg'>pathName</i> <b class='cmd'>configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#32"><i class='arg'>pathName</i> <b class='cmd'>contentbox</b></a></td></tr>
<tr valign=top ><td ><a href="#33"><i class='arg'>pathName</i> <b class='cmd'>debug</b> <i class='arg'>option</i> ?<i class='arg'>arg arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#34"><i class='arg'>pathName</i> <b class='cmd'>debug alloc</b></a></td></tr>
<tr valign=top ><td ><a href="#35"><i class='arg'>pathName</i> <b class='cmd'>debug cget</b> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#36"><i class='arg'>pathName</i> <b class='cmd'>debug configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#37"><i class='arg'>pathName</i> <b class='cmd'>debug dinfo</b> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#38"><i class='arg'>pathName</i> <b class='cmd'>debug expose</b> <i class='arg'>x1</i> <i class='arg'>y1</i> <i class='arg'>x2</i> <i class='arg'>y2</i></a></td></tr>
<tr valign=top ><td ><a href="#39"><i class='arg'>pathName</i> <b class='cmd'>debug scroll</b></a></td></tr>
<tr valign=top ><td ><a href="#40"><i class='arg'>pathName</i> <b class='cmd'>depth</b> ?<i class='arg'>itemDesc</i>?</a></td></tr>
<tr valign=top ><td ><a href="#41"><i class='arg'>pathName</i> <b class='cmd'>dragimage</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#42"><i class='arg'>pathName</i> <b class='cmd'>dragimage add</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>element</i>?</a></td></tr>
<tr valign=top ><td ><a href="#43"><i class='arg'>pathName</i> <b class='cmd'>dragimage cget</b> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#44"><i class='arg'>pathName</i> <b class='cmd'>dragimage clear</b></a></td></tr>
<tr valign=top ><td ><a href="#45"><i class='arg'>pathName</i> <b class='cmd'>dragimage configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#46"><i class='arg'>pathName</i> <b class='cmd'>dragimage offset</b> ?<i class='arg'>x y</i>?</a></td></tr>
<tr valign=top ><td ><a href="#47"><i class='arg'>pathName</i> <b class='cmd'>element</b> <i class='arg'>option</i> ?<i class='arg'>element</i>? ?<i class='arg'>arg arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#48"><i class='arg'>pathName</i> <b class='cmd'>element cget</b> <i class='arg'>element</i> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#49"><i class='arg'>pathName</i> <b class='cmd'>element configure</b> <i class='arg'>element</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#50"><i class='arg'>pathName</i> <b class='cmd'>element create</b> <i class='arg'>element</i> <i class='arg'>type</i> ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#51"><i class='arg'>pathName</i> <b class='cmd'>element delete</b> ?<i class='arg'>element ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#52"><i class='arg'>pathName</i> <b class='cmd'>element names</b></a></td></tr>
<tr valign=top ><td ><a href="#53"><i class='arg'>pathName</i> <b class='cmd'>element perstate</b> <i class='arg'>element</i> <i class='arg'>option</i> <i class='arg'>stateList</i></a></td></tr>
<tr valign=top ><td ><a href="#54"><i class='arg'>pathName</i> <b class='cmd'>element type</b> <i class='arg'>element</i></a></td></tr>
<tr valign=top ><td ><a href="#55"><i class='arg'>pathName</i> <b class='cmd'>expand</b> ?<strong>-recurse</strong>? ?<i class='arg'>itemDesc ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#56"><i class='arg'>pathName</i> <b class='cmd'>identify</b> <i class='arg'>x</i> <i class='arg'>y</i></a></td></tr>
<tr valign=top ><td ><a href="#57"><i class='arg'>pathName</i> <b class='cmd'>index</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#58"><i class='arg'>pathName</i> <b class='cmd'>item</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#59"><i class='arg'>pathName</i> <b class='cmd'>item ancestors</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#60"><i class='arg'>pathName</i> <b class='cmd'>item bbox</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>element</i>?</a></td></tr>
<tr valign=top ><td ><a href="#61"><i class='arg'>pathName</i> <b class='cmd'>item cget</b> <i class='arg'>itemDesc</i> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#62"><i class='arg'>pathName</i> <b class='cmd'>item children</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#63"><i class='arg'>pathName</i> <b class='cmd'>item collapse</b> <i class='arg'>itemDesc</i> ?<strong>-recurse</strong>?</a></td></tr>
<tr valign=top ><td ><a href="#64"><i class='arg'>pathName</i> <b class='cmd'>item compare</b> <i class='arg'>itemDesc1</i> <i class='arg'>op</i> <i class='arg'>itemDesc2</i></a></td></tr>
<tr valign=top ><td ><a href="#65"><i class='arg'>pathName</i> <b class='cmd'>item complex</b> <i class='arg'>itemDesc</i> ?<i class='arg'>list...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#66"><i class='arg'>pathName</i> <b class='cmd'>item configure</b> <i class='arg'>itemDesc</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#67"><i class='arg'>pathName</i> <b class='cmd'>item count</b> ?<i class='arg'>itemDesc</i>?</a></td></tr>
<tr valign=top ><td ><a href="#68"><i class='arg'>pathName</i> <b class='cmd'>item create</b> ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#69"><i class='arg'>pathName</i> <b class='cmd'>item delete</b> <i class='arg'>first</i> ?<i class='arg'>last</i>?</a></td></tr>
<tr valign=top ><td ><a href="#70"><i class='arg'>pathName</i> <b class='cmd'>item descendants</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#71"><i class='arg'>pathName</i> <b class='cmd'>item dump</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#72"><i class='arg'>pathName</i> <b class='cmd'>item element</b> <i class='arg'>command</i> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#73"><i class='arg'>pathName</i> <b class='cmd'>item element actual</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#74"><i class='arg'>pathName</i> <b class='cmd'>item element cget</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#75"><i class='arg'>pathName</i> <b class='cmd'>item element configure</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#76"><i class='arg'>pathName</i> <b class='cmd'>item element perstate</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> <i class='arg'>option</i> ?<i class='arg'>stateList</i>?</a></td></tr>
<tr valign=top ><td ><a href="#77"><i class='arg'>pathName</i> <b class='cmd'>item enabled</b> <i class='arg'>itemDesc</i> ?<i class='arg'>boolean</i>?</a></td></tr>
<tr valign=top ><td ><a href="#78"><i class='arg'>pathName</i> <b class='cmd'>item expand</b> <i class='arg'>itemDesc</i> ?<strong>-recurse</strong>?</a></td></tr>
<tr valign=top ><td ><a href="#79"><i class='arg'>pathName</i> <b class='cmd'>item firstchild</b> <i class='arg'>parent</i> ?<i class='arg'>child</i>?</a></td></tr>
<tr valign=top ><td ><a href="#80"><i class='arg'>pathName</i> <b class='cmd'>item id</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#81"><i class='arg'>pathName</i> <b class='cmd'>item image</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>image</i>? ?<i class='arg'>column image ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#82"><i class='arg'>pathName</i> <b class='cmd'>item isancestor</b> <i class='arg'>itemDesc</i> <i class='arg'>descendant</i></a></td></tr>
<tr valign=top ><td ><a href="#83"><i class='arg'>pathName</i> <b class='cmd'>item isopen</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#84"><i class='arg'>pathName</i> <b class='cmd'>item lastchild</b> <i class='arg'>parent</i> ?<i class='arg'>child</i>?</a></td></tr>
<tr valign=top ><td ><a href="#85"><i class='arg'>pathName</i> <b class='cmd'>item nextsibling</b> <i class='arg'>sibling</i> ?<i class='arg'>next</i>?</a></td></tr>
<tr valign=top ><td ><a href="#86"><i class='arg'>pathName</i> <b class='cmd'>item numchildren</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#87"><i class='arg'>pathName</i> <b class='cmd'>item order</b> <i class='arg'>itemDesc</i> ?<i class='arg'>-visible</i>?</a></td></tr>
<tr valign=top ><td ><a href="#88"><i class='arg'>pathName</i> <b class='cmd'>item parent</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#89"><i class='arg'>pathName</i> <b class='cmd'>item prevsibling</b> <i class='arg'>sibling</i> ?<i class='arg'>prev</i>?</a></td></tr>
<tr valign=top ><td ><a href="#90"><i class='arg'>pathName</i> <b class='cmd'>item range</b> <i class='arg'>first</i> <i class='arg'>last</i></a></td></tr>
<tr valign=top ><td ><a href="#91"><i class='arg'>pathName</i> <b class='cmd'>item remove</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#92"><i class='arg'>pathName</i> <b class='cmd'>item rnc</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#93"><i class='arg'>pathName</i> <b class='cmd'>item sort</b> <i class='arg'>itemDesc</i> ?<i class='arg'>option ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#94"><i class='arg'>pathName</i> <b class='cmd'>item span</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>numColumns</i>? ?<i class='arg'>column numColumns ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#95"><i class='arg'>pathName</i> <b class='cmd'>item state</b> <i class='arg'>command</i> <i class='arg'>itemDesc</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#96"><i class='arg'>pathName</i> <b class='cmd'>item state forcolumn</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> ?<i class='arg'>stateDescList</i>?</a></td></tr>
<tr valign=top ><td ><a href="#97"><i class='arg'>pathName</i> <b class='cmd'>item state get</b> <i class='arg'>itemDesc</i> ?<i class='arg'>stateName</i>?</a></td></tr>
<tr valign=top ><td ><a href="#98"><i class='arg'>pathName</i> <b class='cmd'>item state set</b> <i class='arg'>itemDesc</i> ?<i class='arg'>lastItem</i>? <i class='arg'>stateDescList</i></a></td></tr>
<tr valign=top ><td ><a href="#99"><i class='arg'>pathName</i> <b class='cmd'>item style</b> <i class='arg'>command</i> <i class='arg'>itemDesc</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#100"><i class='arg'>pathName</i> <b class='cmd'>item style elements</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i></a></td></tr>
<tr valign=top ><td ><a href="#101"><i class='arg'>pathName</i> <b class='cmd'>item style map</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>style</i> <i class='arg'>map</i></a></td></tr>
<tr valign=top ><td ><a href="#102"><i class='arg'>pathName</i> <b class='cmd'>item style set</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>style</i>? ?<i class='arg'>column style ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#103"><i class='arg'>pathName</i> <b class='cmd'>item tag</b> <i class='arg'>option</i> ?<i class='arg'>arg arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#104"><i class='arg'>pathName</i> <b class='cmd'>item tag add</b> <i class='arg'>itemDesc</i> <i class='arg'>tagList</i></a></td></tr>
<tr valign=top ><td ><a href="#105"><i class='arg'>pathName</i> <b class='cmd'>item tag expr</b> <i class='arg'>itemDesc</i> <i class='arg'>tagExpr</i></a></td></tr>
<tr valign=top ><td ><a href="#106"><i class='arg'>pathName</i> <b class='cmd'>item tag names</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#107"><i class='arg'>pathName</i> <b class='cmd'>item tag remove</b> <i class='arg'>itemDesc</i> <i class='arg'>tagList</i></a></td></tr>
<tr valign=top ><td ><a href="#108"><i class='arg'>pathName</i> <b class='cmd'>item text</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>text</i>? ?<i class='arg'>column text ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#109"><i class='arg'>pathName</i> <b class='cmd'>item toggle</b> <i class='arg'>itemDesc</i> ?<strong>-recurse</strong>?</a></td></tr>
<tr valign=top ><td ><a href="#110"><i class='arg'>pathName</i> <b class='cmd'>marquee</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#111"><i class='arg'>pathName</i> <b class='cmd'>marquee anchor</b> ?<i class='arg'>x y</i>?</a></td></tr>
<tr valign=top ><td ><a href="#112"><i class='arg'>pathName</i> <b class='cmd'>marquee cget</b> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#113"><i class='arg'>pathName</i> <b class='cmd'>marquee configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#114"><i class='arg'>pathName</i> <b class='cmd'>marquee coords</b> ?<i class='arg'>x1 y1 x2 y2</i>?</a></td></tr>
<tr valign=top ><td ><a href="#115"><i class='arg'>pathName</i> <b class='cmd'>marquee corner</b> ?<i class='arg'>x y</i>?</a></td></tr>
<tr valign=top ><td ><a href="#116"><i class='arg'>pathName</i> <b class='cmd'>marquee identify</b></a></td></tr>
<tr valign=top ><td ><a href="#117"><i class='arg'>pathName</i> <b class='cmd'>notify</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#118"><i class='arg'>pathName</i> <b class='cmd'>notify bind</b> ?<i class='arg'>object</i>? ?<i class='arg'>pattern</i>? ?+??<i class='arg'>script</i>?</a></td></tr>
<tr valign=top ><td ><a href="#119"><i class='arg'>pathName</i> <b class='cmd'>notify configure</b> <i class='arg'>object</i> <i class='arg'>pattern</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#120"><i class='arg'>pathName</i> <b class='cmd'>notify detailnames</b> <i class='arg'>eventName</i></a></td></tr>
<tr valign=top ><td ><a href="#121"><i class='arg'>pathName</i> <b class='cmd'>notify eventnames</b></a></td></tr>
<tr valign=top ><td ><a href="#122"><i class='arg'>pathName</i> <b class='cmd'>notify generate</b> <i class='arg'>pattern</i> ?<i class='arg'>charMap</i>? ?<i class='arg'>percentsCommand</i>?</a></td></tr>
<tr valign=top ><td ><a href="#123"><i class='arg'>pathName</i> <b class='cmd'>notify install</b> <i class='arg'>pattern</i> ?<i class='arg'>percentsCommand</i>?</a></td></tr>
<tr valign=top ><td ><a href="#124"><i class='arg'>pathName</i> <b class='cmd'>notify install detail</b> <i class='arg'>eventName</i> <i class='arg'>detail</i> ?<i class='arg'>percentsCommand</i>?</a></td></tr>
<tr valign=top ><td ><a href="#125"><i class='arg'>pathName</i> <b class='cmd'>notify install event</b> <i class='arg'>eventName</i> ?<i class='arg'>percentsCommand</i>?</a></td></tr>
<tr valign=top ><td ><a href="#126"><i class='arg'>pathName</i> <b class='cmd'>notify linkage</b> <i class='arg'>pattern</i></a></td></tr>
<tr valign=top ><td ><a href="#127"><i class='arg'>pathName</i> <b class='cmd'>notify linkage</b> <i class='arg'>eventName</i> ?<i class='arg'>detail</i>?</a></td></tr>
<tr valign=top ><td ><a href="#128"><i class='arg'>pathName</i> <b class='cmd'>notify unbind</b> <i class='arg'>object</i> ?<i class='arg'>pattern</i>?</a></td></tr>
<tr valign=top ><td ><a href="#129"><i class='arg'>pathName</i> <b class='cmd'>notify uninstall</b> <i class='arg'>pattern</i></a></td></tr>
<tr valign=top ><td ><a href="#130"><i class='arg'>pathName</i> <b class='cmd'>notify uninstall detail</b> <i class='arg'>eventName</i> <i class='arg'>detail</i></a></td></tr>
<tr valign=top ><td ><a href="#131"><i class='arg'>pathName</i> <b class='cmd'>notify uninstall event</b> <i class='arg'>eventName</i></a></td></tr>
<tr valign=top ><td ><a href="#132"><i class='arg'>pathName</i> <b class='cmd'>numcolumns</b></a></td></tr>
<tr valign=top ><td ><a href="#133"><i class='arg'>pathName</i> <b class='cmd'>numitems</b></a></td></tr>
<tr valign=top ><td ><a href="#134"><i class='arg'>pathName</i> <b class='cmd'>orphans</b></a></td></tr>
<tr valign=top ><td ><a href="#135"><i class='arg'>pathName</i> <b class='cmd'>range</b> <i class='arg'>first</i> <i class='arg'>last</i></a></td></tr>
<tr valign=top ><td ><a href="#136"><i class='arg'>pathName</i> <b class='cmd'>scan</b> <i class='arg'>option</i> <i class='arg'>args</i></a></td></tr>
<tr valign=top ><td ><a href="#137"><i class='arg'>pathName</i> <b class='cmd'>scan mark</b> <i class='arg'>x</i> <i class='arg'>y</i></a></td></tr>
<tr valign=top ><td ><a href="#138"><i class='arg'>pathName</i> <b class='cmd'>scan dragto</b> <i class='arg'>x</i> <i class='arg'>y</i> ?<i class='arg'>gain</i>?</a></td></tr>
<tr valign=top ><td ><a href="#139"><i class='arg'>pathName</i> <b class='cmd'>state</b> <i class='arg'>option</i> <i class='arg'>args</i></a></td></tr>
<tr valign=top ><td ><a href="#140"><i class='arg'>pathName</i> <b class='cmd'>state define</b> <i class='arg'>stateName</i></a></td></tr>
<tr valign=top ><td ><a href="#141"><i class='arg'>pathName</i> <b class='cmd'>state linkage</b> <i class='arg'>stateName</i></a></td></tr>
<tr valign=top ><td ><a href="#142"><i class='arg'>pathName</i> <b class='cmd'>state names</b></a></td></tr>
<tr valign=top ><td ><a href="#143"><i class='arg'>pathName</i> <b class='cmd'>state undefine</b> ?<i class='arg'>stateName ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#144"><i class='arg'>pathName</i> <b class='cmd'>see</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#145"><i class='arg'>pathName</i> <b class='cmd'>selection</b> <i class='arg'>option</i> <i class='arg'>args</i></a></td></tr>
<tr valign=top ><td ><a href="#146"><i class='arg'>pathName</i> <b class='cmd'>selection add</b> <i class='arg'>first</i> ?<i class='arg'>last</i>?</a></td></tr>
<tr valign=top ><td ><a href="#147"><i class='arg'>pathName</i> <b class='cmd'>selection anchor</b> ?<i class='arg'>itemDesc</i>?</a></td></tr>
<tr valign=top ><td ><a href="#148"><i class='arg'>pathName</i> <b class='cmd'>selection clear</b> ?<i class='arg'>first</i>? ?<i class='arg'>last</i>?</a></td></tr>
<tr valign=top ><td ><a href="#149"><i class='arg'>pathName</i> <b class='cmd'>selection count</b></a></td></tr>
<tr valign=top ><td ><a href="#150"><i class='arg'>pathName</i> <b class='cmd'>selection get</b> ?<i class='arg'>first</i>? ?<i class='arg'>last</i>?</a></td></tr>
<tr valign=top ><td ><a href="#151"><i class='arg'>pathName</i> <b class='cmd'>selection includes</b> <i class='arg'>itemDesc</i></a></td></tr>
<tr valign=top ><td ><a href="#152"><i class='arg'>pathName</i> <b class='cmd'>selection modify</b> <i class='arg'>select</i> <i class='arg'>deselect</i></a></td></tr>
<tr valign=top ><td ><a href="#153"><i class='arg'>pathName</i> <b class='cmd'>style</b> <i class='arg'>option</i> ?<i class='arg'>element</i>? ?<i class='arg'>arg arg ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#154"><i class='arg'>pathName</i> <b class='cmd'>style cget</b> <i class='arg'>style</i> <i class='arg'>option</i></a></td></tr>
<tr valign=top ><td ><a href="#155"><i class='arg'>pathName</i> <b class='cmd'>style configure</b> <i class='arg'>style</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#156"><i class='arg'>pathName</i> <b class='cmd'>style create</b> <i class='arg'>style</i> ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#157"><i class='arg'>pathName</i> <b class='cmd'>style delete</b> ?<i class='arg'>style ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#158"><i class='arg'>pathName</i> <b class='cmd'>style elements</b> <i class='arg'>style</i> ?<i class='arg'>elementList</i>?</a></td></tr>
<tr valign=top ><td ><a href="#159"><i class='arg'>pathName</i> <b class='cmd'>style layout</b> <i class='arg'>style</i> <i class='arg'>element</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#160"><i class='arg'>pathName</i> <b class='cmd'>style names</b></a></td></tr>
<tr valign=top ><td ><a href="#161"><i class='arg'>pathName</i> <b class='cmd'>toggle</b> ?<strong>-recurse</strong>? ?<i class='arg'>itemDesc ...</i>?</a></td></tr>
<tr valign=top ><td ><a href="#162"><i class='arg'>pathName</i> <b class='cmd'>xview</b> ?<i class='arg'>args</i>?</a></td></tr>
<tr valign=top ><td ><a href="#163"><i class='arg'>pathName</i> <b class='cmd'>xview</b></a></td></tr>
<tr valign=top ><td ><a href="#164"><i class='arg'>pathName</i> <b class='cmd'>xview moveto</b> <i class='arg'>fraction</i></a></td></tr>
<tr valign=top ><td ><a href="#165"><i class='arg'>pathName</i> <b class='cmd'>xview scroll</b> <i class='arg'>number</i> <i class='arg'>what</i></a></td></tr>
<tr valign=top ><td ><a href="#166"><i class='arg'>pathName</i> <b class='cmd'>yview</b> ?<i class='arg'>args</i>?</a></td></tr>
<tr valign=top ><td ><a href="#167"><i class='arg'>pathName</i> <b class='cmd'>yview</b></a></td></tr>
<tr valign=top ><td ><a href="#168"><i class='arg'>pathName</i> <b class='cmd'>yview moveto</b> <i class='arg'>fraction</i></a></td></tr>
<tr valign=top ><td ><a href="#169"><i class='arg'>pathName</i> <b class='cmd'>yview scroll</b> <i class='arg'>number</i> <i class='arg'>what</i></a></td></tr>
</table></td></tr></table>
<h2><a name="description">DESCRIPTION</a></h2>
<p>
<dl> 
<dt><a name="1"><b class='cmd'>treectrl</b> <i class='arg'>pathName</i> ?<i class='arg'>options</i>?</a><dd>

</dl>

<p>
The <b class='cmd'>treectrl</b> command creates a new window (given by the
<i class='arg'>pathName</i> argument) and makes it into a treectrl widget.
Additional options, described above, may be specified on the
command line or in the option database
to configure aspects of the treectrl such as its background color
and relief.  The <b class='cmd'>treectrl</b> command returns the
path name of the new window.
At the time this command is invoked, there must not
exist a window named <i class='arg'>pathName</i>, but <i class='arg'>pathName</i>'s parent must exist.

<p>
A treectrl is a widget which displays items in a one- or two-dimensional arrangement.
Items have a parent-child relationship with other items.
Items have a set of states, which are boolean properties.
Items may be spread about one or more columns.
For each column of an item there is a style associated,
which determines how to display the item's column
taking into account the item's current state set.
One column can be defined to display the data in a hierarchical structure.

<p>
Normally the origin of the coordinate system is at the
upper-left corner of the window containing the treectrl.
It is possible to adjust the origin of the coordinate system
relative to the origin of the window using the
<b class='cmd'>xview</b> and <b class='cmd'>yview</b> widget commands;
this is typically used for scrolling.

<p>
A treectrl widget can be horizontal or vertical oriented
like many other Tk widgets.
For displaying hierarchical data only vertical orientation is useful,
since only then the children of an item
are displayed directly below their parent.
If the treectrl widget is used only
to display data in a multicolumn listbox,
the specification of an orientation will give useful results.

<h2><a name="standard_options">STANDARD OPTIONS</a></h2>
<p>
<dl>
<dt><strong><strong>-background</strong></strong><dd>
<dt><strong><strong>-borderwidth</strong></strong><dd>
<dt><strong><strong>-cursor</strong></strong><dd>
<dt><strong><strong>-font</strong></strong><dd>
<dt><strong><strong>-highlightbackground</strong></strong><dd>
<dt><strong><strong>-highlightcolor</strong></strong><dd>
<dt><strong><strong>-highlightthickness</strong></strong><dd>
<dt><strong><strong>-orient</strong></strong><dd>
<dt><strong><strong>-relief</strong></strong><dd>
<dt><strong><strong>-takefocus</strong></strong><dd>
<dt><strong><strong>-xscrollcommand</strong></strong><dd>
<dt><strong><strong>-yscrollcommand</strong></strong><dd>
<dt><strong><strong>-foreground</strong></strong><dd>
</dl>
See the <b class='cmd'>option</b> manual entry for details on the standard options.

<h2><a name="widget_specific_options">WIDGET SPECIFIC OPTIONS</a></h2>
<p>
<dl>
<dt>Command-Line Switch:	<strong>-backgroundimage</strong><br>
Database Name:	<strong>backgroundImage</strong><br>
Database Class:	<strong>BackgroundImage</strong><br>
<dd>
Specifies the name of an image to draw as the list background. The image is
tiled horizontally and vertically to fill the content area of the list. If
the image is transparent it is drawn on top of the background color(s).

<br><br>
<dt>Command-Line Switch:	<strong>-backgroundmode</strong><br>
Database Name:	<strong>backgroundMode</strong><br>
Database Class:	<strong>BackgroundMode</strong><br>
<dd>
Specifies how the background color of items is chosen in each column.
The value should be one of <strong>row</strong>, <strong>column</strong>, <strong>order</strong>,
or <strong>ordervisible</strong>. The default is <strong>row</strong>.
This option has only an effect
for columns which have <strong>-itembackground</strong> defined as list of two or more
colors (see section <a href="#columns">COLUMNS</a> below for more on this). If <strong>row</strong> or
<strong>column</strong> is specified, the background color is chosen based on the location
of the item in the 1- or 2-dimensional grid of items as layed out on the screen;
this layout of items is affected by the <strong>-orient</strong> and <strong>-wrap</strong> options as
well as item visibility.
When <strong>order</strong> or <strong>ordervisible</strong> is specified,
the background color is chosen based on the result of the <b class='cmd'>item order</b>
command, regardless of the layout of items.

<br><br>
<dt>Command-Line Switch:	<strong>-buttonbitmap</strong><br>
Database Name:	<strong>buttonBitmap</strong><br>
Database Class:	<strong>ButtonBitmap</strong><br>
<dd>
Specifies the bitmap to be used as the expand/collapse button to the left of
an item. This is a <a href="#per-state_options">per-state</a> option. If
a bitmap is specified for a certain item state, it overrides the effects of
-usetheme.

<br><br>
<dt>Command-Line Switch:	<strong>-buttoncolor</strong><br>
Database Name:	<strong>buttonColor</strong><br>
Database Class:	<strong>ButtonColor</strong><br>
<dd>
Specifies the foreground color which should be used for drawing the outline
and the plus or minus sign of the button to the left of an item.

<br><br>
<dt>Command-Line Switch:	<strong>-buttonimage</strong><br>
Database Name:	<strong>buttonImage</strong><br>
Database Class:	<strong>ButtonImage</strong><br>
<dd>
Specifies the image to be used as the expand/collapse button to the left of
an item. This is a <a href="#per-state_options">per-state</a> option.
If an image is specified for a certain item state, it overrides the effects of
-buttonbitmap and -usetheme.

<br><br>
<dt>Command-Line Switch:	<strong>-buttonsize</strong><br>
Database Name:	<strong>buttonSize</strong><br>
Database Class:	<strong>ButtonSize</strong><br>
<dd>
Specifies the width and height of the button drawn to the left of an item
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.

<br><br>
<dt>Command-Line Switch:	<strong>-buttonthickness</strong><br>
Database Name:	<strong>buttonThickness</strong><br>
Database Class:	<strong>ButtonThickness</strong><br>
<dd>
Specifies the width of the outline and the plus or minus sign
of the button to the left of an item
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.

<br><br>
<dt>Command-Line Switch:	<strong>-columnprefix</strong><br>
Database Name:	<strong>columnPrefix</strong><br>
Database Class:	<strong>ColumnPrefix</strong><br>
<dd>
Specifies an ascii string that changes the way column ids are reported and
processed. If this option is a non-empty string, the usual integer value
of a column id is prefixed with the given string. This can aid debugging
but it is important your code doesn't assume column ids are integers if you
use it.

<br><br>
<dt>Command-Line Switch:	<strong>-columnproxy</strong><br>
Database Name:	<strong>columnProxy</strong><br>
Database Class:	<strong>ColumnProxy</strong><br>
<dd>
If this option specifies a non empty value,
it should be a screen distance
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
Then a 1 pixel thick vertical line will be drawn
at the specified screen distance from the left edge of the treectrl widget,
which reaches from top to bottom of the treectrl widget
and uses an inverting color
(i.e black on lighter background, white on darker background).
This line can be used to give the user a visual feedback
during column resizing.

<br><br>
<dt>Command-Line Switch:	<strong>-columnresizemode</strong><br>
Database Name:	<strong>columnResizeMode</strong><br>
Database Class:	<strong>ColumnResizeMode</strong><br>
<dd>
Specifies the visual feedback used when resizing columns. The value should be
one of <strong>proxy</strong> or <strong>realtime</strong>. For <strong>proxy</strong>, a 1-pixel thick
vertical line is drawn representing where the right edge of the column will
be after resizing. For <strong>realtime</strong>, the column's size is changed while
the user is dragging the right edge of the column.

<br><br>
<dt>Command-Line Switch:	<strong>-columntagexpr</strong><br>
Database Name:	<strong>columnTagExpr</strong><br>
Database Class:	<strong>ColumnTagExpr</strong><br>
<dd>
Specifies a boolean that enables or disables tag expressions in column
descriptions. See <a href="#item_and_column_tags">ITEM AND COLUMN TAGS</a>.

<br><br>
<dt>Command-Line Switch:	<strong>-defaultstyle</strong><br>
Database Name:	<strong>defaultStyle</strong><br>
Database Class:	<strong>DefaultStyle</strong><br>
<dd>
This option is deprecated; use the column option <strong>-itemstyle</strong> instead.
Specifies a list of styles, one per column, to apply to each item created by
the <b class='cmd'>item create</b> command. The number of styles in the list can be
different from the number of tree columns.
Each list element should be a valid style name or an empty string to
indicate no style should be applied to a specific column. The list of styles
is updated if a style is deleted or if a column is moved.

<br><br>
<dt>Command-Line Switch:	<strong>-doublebuffer</strong><br>
Database Name:	<strong>doubleBuffer</strong><br>
Database Class:	<strong>DoubleBuffer</strong><br>
<dd>
Specifies if double-buffering should be used to improve displaying.
The value should be one of <strong>none</strong>, <strong>window</strong>, or <strong>item</strong>.
For <strong>none</strong> no double-buffering is used at all, which may be most memory
efficient, but will probably generate some flickering on the screen.
For <strong>window</strong> the complete tree is double-buffered, which requires
a buffer big enough to contain the complete widget.
For <strong>item</strong>, which is the default, every item is separately
double-buffered, so it works with a buffer size as big as the biggest item.

<br><br>
<dt>Command-Line Switch:	<strong>-height</strong><br>
Database Name:	<strong>height</strong><br>
Database Class:	<strong>Height</strong><br>
<dd>
Specifies the desired height for the window
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
The default is 200 pixels.
If this option is less than or equal to zero then the window will
not request any size at all.

<br><br>
<dt>Command-Line Switch:	<strong>-indent</strong><br>
Database Name:	<strong>indent</strong><br>
Database Class:	<strong>Indent</strong><br>
<dd>
Specifies the screen distance an item is indented relative to its parent item
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
The default is 19 pixels.

<br><br>
<dt>Command-Line Switch:	<strong>-itemheight</strong><br>
Database Name:	<strong>itemHeight</strong><br>
Database Class:	<strong>ItemHeight</strong><br>
<dd>
Specifies a fixed height for every item
in any of the forms acceptable to <strong>Tk_GetPixels</strong>. If non-zero, this
option overrides the requested height of an item and the -minitemheight option.
The default is 0, which means that
every item has the height requested by the arrangement of elements
in each column. Items are never shorter than the maximum height of a button.

<br><br>
<dt>Command-Line Switch:	<strong>-itemprefix</strong><br>
Database Name:	<strong>itemPrefix</strong><br>
Database Class:	<strong>ItemPrefix</strong><br>
<dd>
Specifies an ascii string that changes the way item ids are reported and
processed. If this option is a non-empty string, the usual integer value
of an item id is prefixed with the given string. This can aid debugging
but it is important your code doesn't assume item ids are integers if you
use it.

<br><br>
<dt>Command-Line Switch:	<strong>-itemtagexpr</strong><br>
Database Name:	<strong>itemTagExpr</strong><br>
Database Class:	<strong>ItemTagExpr</strong><br>
<dd>
Specifies a boolean that enables or disables tag expressions in item
descriptions. See <a href="#item_and_column_tags">ITEM AND COLUMN TAGS</a>.

<br><br>
<dt>Command-Line Switch:	<strong>-itemwidth</strong><br>
Database Name:	<strong>itemWidth</strong><br>
Database Class:	<strong>ItemWidth</strong><br>
<dd>
Specifies a fixed width for every item in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
If more than one column is visible, then this option has no effect.
If the -orient option is vertical, and the -wrap option is unspecified, then this
option has no effect (in that case all items are as wide as the column).

<br><br>
<dt>Command-Line Switch:	<strong>-itemwidthequal</strong><br>
Database Name:	<strong>itemWidthEqual</strong><br>
Database Class:	<strong>ItemWidthEqual</strong><br>
<dd>
Specifies a boolean that says whether all items should have the same width.
If more than one column is visible, then this option has no effect.
If the -orient option is vertical, and the -wrap option is unspecified, then this
option has no effect (in that case all items are as wide as the column).
If the -itemwidth option is specified, then this option has no effect.

<br><br>
<dt>Command-Line Switch:	<strong>-itemwidthmultiple</strong><br>
Database Name:	<strong>itemWidthMultiple</strong><br>
Database Class:	<strong>ItemWidthMultiple</strong><br>
<dd>
Specifies a screen distance that every item's width will be evenly divisible by in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
If more than one column is visible, then this option has no effect.
If the -orient option is vertical, and the -wrap option is unspecified, then this
option has no effect (in that case all items are as wide as the column).
If the -itemwidth option is specified, then this option has no effect.

<br><br>
<dt>Command-Line Switch:	<strong>-linecolor</strong><br>
Database Name:	<strong>lineColor</strong><br>
Database Class:	<strong>LineColor</strong><br>
<dd>
Specifies the color which should be used for drawing
the connecting lines between related items.

<br><br>
<dt>Command-Line Switch:	<strong>-linestyle</strong><br>
Database Name:	<strong>lineStyle</strong><br>
Database Class:	<strong>LineStyle</strong><br>
<dd>
Specifies the style of the connecting lines between related items,
should be <strong>dot</strong> which is the default, or <strong>solid</strong>.

<br><br>
<dt>Command-Line Switch:	<strong>-linethickness</strong><br>
Database Name:	<strong>lineThickness</strong><br>
Database Class:	<strong>LineThickness</strong><br>
<dd>
Specifies the thickness of the connecting lines between related items
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.

<br><br>
<dt>Command-Line Switch:	<strong>-minitemheight</strong><br>
Database Name:	<strong>minItemHeight</strong><br>
Database Class:	<strong>MinItemHeight</strong><br>
<dd>
Specifies a minimum height for every item
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
The default is 0, which means that
every item has the height requested by the arrangement of elements
in each column. This option has no effect if the -itemheight option is specified.
Items are never shorter than the maximum height of a button.

<br><br>
<dt>Command-Line Switch:	<strong>-rowproxy</strong><br>
Database Name:	<strong>rowProxy</strong><br>
Database Class:	<strong>RowProxy</strong><br>
<dd>
If this option specifies a non empty value,
it should be a screen distance
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
Then a 1 pixel thick horizontal line will be drawn
at the specified screen distance from the top edge of the treectrl widget,
which reaches from left to right of the treectrl widget
and uses an inverting color
(i.e black on lighter background, white on darker background).
This line can be used to give the user a visual feedback
during row resizing.

<br><br>
<dt>Command-Line Switch:	<strong>-scrollmargin</strong><br>
Database Name:	<strong>scrollMargin</strong><br>
Database Class:	<strong>ScrollMargin</strong><br>
<dd>
Specifies a positive screen distance
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
This option is used by the default bindings to determine how close to the
edges of the contentbox the mouse pointer must be before scrolling occurs.
Specifying a positive value is useful when items may be drag-and-dropped.
Defaults to 0.

<br><br>
<dt>Command-Line Switch:	<strong>-selectmode</strong><br>
Database Name:	<strong>selectMode</strong><br>
Database Class:	<strong>SelectMode</strong><br>
<dd>
Specifies one of several styles for manipulating the selection.
The value of the option may be arbitrary, but the default bindings
expect it to be either <strong>single</strong>, <strong>browse</strong>, <strong>multiple</strong>,
or <strong>extended</strong>;  the default value is <strong>browse</strong>.

<br><br>
<dt>Command-Line Switch:	<strong>-showbuttons</strong><br>
Database Name:	<strong>showButtons</strong><br>
Database Class:	<strong>ShowButtons</strong><br>
<dd>
Specifies a boolean value that determines whether this widget
leaves indentation space to display the expand/collapse buttons next to items.
The default value is true.
The item option <strong>-button</strong> determines whether any item has a button.
See also the treectrl option <strong>-showrootbutton</strong>. 

<br><br>
<dt>Command-Line Switch:	<strong>-showheader</strong><br>
Database Name:	<strong>showHeader</strong><br>
Database Class:	<strong>ShowHeader</strong><br>
<dd>
Specifies a boolean value that determines whether this widget
should display the header line with the column names at the top of the widget.
The default value is true.

<br><br>
<dt>Command-Line Switch:	<strong>-showlines</strong><br>
Database Name:	<strong>showLines</strong><br>
Database Class:	<strong>ShowLines</strong><br>
<dd>
Specifies a boolean value that determines whether this widget
should draw the connecting lines between related items.
The default value is true.

<br><br>
<dt>Command-Line Switch:	<strong>-showroot</strong><br>
Database Name:	<strong>showRoot</strong><br>
Database Class:	<strong>ShowRoot</strong><br>
<dd>
Specifies a boolean value that determines whether this widget
should draw the root item.
By suppressing the drawing of the root item the widget can have
multiple items that appear as <em>toplevel</em> items.
The default value is true.

<br><br>
<dt>Command-Line Switch:	<strong>-showrootbutton</strong><br>
Database Name:	<strong>showRootButton</strong><br>
Database Class:	<strong>ShowRootButton</strong><br>
<dd>
Specifies a boolean value that determines whether this widget
leaves indentation space to display the expand/collapse button next to the
root item. The default value is false.
The item option <strong>-button</strong> determines whether the root item has a button.

<br><br>
<dt>Command-Line Switch:	<strong>-showrootchildbuttons</strong><br>
Database Name:	<strong>showRootChildButtons</strong><br>
Database Class:	<strong>ShowRootChildButtons</strong><br>
<dd>
Specifies a boolean value that determines whether this widget
should draw the expand/collapse buttons next to children of the root item.
The default value is true.

<br><br>
<dt>Command-Line Switch:	<strong>-showrootlines</strong><br>
Database Name:	<strong>showRootLines</strong><br>
Database Class:	<strong>ShowRootLines</strong><br>
<dd>
Specifies a boolean value that determines whether this widget
should draw the connecting lines between children of the root item.
The default value is true.

<br><br>
<dt>Command-Line Switch:	<strong>-treecolumn</strong><br>
Database Name:	<strong>treeColumn</strong><br>
Database Class:	<strong>TreeColumn</strong><br>
<dd>
Specifies a <a href="#column_description">column description</a> that determines which
column displays the buttons and lines.
The default is unspecified.

<br><br>
<dt>Command-Line Switch:	<strong>-usetheme</strong><br>
Database Name:	<strong>useTheme</strong><br>
Database Class:	<strong>UseTheme</strong><br>
<dd>
Specifies a boolean value that determines whether this widget should draw
parts of itself using a platform-specific theme manager.
The default is false.

<br><br>
<dt>Command-Line Switch:	<strong>-width</strong><br>
Database Name:	<strong>width</strong><br>
Database Class:	<strong>Width</strong><br>
<dd>
Specifies the desired width for the window
in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
The default is 200 pixel.
If this option is less than or equal to zero then the window will
not request any size at all.

<br><br>
<dt>Command-Line Switch:	<strong>-wrap</strong><br>
Database Name:	<strong>wrap</strong><br>
Database Class:	<strong>Wrap</strong><br>
<dd>
Specifies whether items are arranged in a 1- or 2-dimensional layout.

If the value is an empty string (the default), then items are arranged from top
to bottom (-orient vertical) or from left to right (-orient horizontal) in
a 1-dimensional layout.

If the value is &quot;<em>N</em> <strong>items</strong>&quot;, then a no more than <em>N</em> items will appear in
a vertical group (-orient vertical) or horizontal group (-orient horizontal).

If the value is &quot;<em>N</em> <strong>pixels</strong>&quot;, then a no vertical group of items will be
taller than <em>N</em> pixels (-orient vertical) or no horizontal group of items will
be wider than <em>N</em> pixels (-orient horizontal).

If the value is <strong>window</strong>, then a no vertical group of items will be
taller than the window (-orient vertical) or no horizontal group of items will
be wider than the window (-orient horizontal).

<br><br>
<dt>Command-Line Switch:	<strong>-xscrolldelay</strong><br>
Database Name:	<strong>xScrollDelay</strong><br>
Database Class:	<strong>ScrollDelay</strong><br>
<dd>
This option controls how quickly horizontal scrolling occurs while dragging
the mouse with button 1 pressed.
The value should be a list of 1 or 2 integers interpreted as microseconds.
If 2 values are specified, then the first value determines the intial delay 
after the first scroll, and the second value determines the delay for all
scrolling after the first. If only 1 value is specified, each scroll takes
place after that delay.

<br><br>
<dt>Command-Line Switch:	<strong>-xscrollincrement</strong><br>
Database Name:	<strong>xScrollIncrement</strong><br>
Database Class:	<strong>ScrollIncrement</strong><br>
<dd>
Specifies an increment for horizontal scrolling, in any of the usual forms
permitted for screen distances.  If the value of this option is greater
than zero, the horizontal view in the window will be constrained so that
the x coordinate at the left edge of the window is always an even
multiple of <strong>-xscrollincrement</strong>;  furthermore, the units for scrolling
(e.g., the change in view when the left and right arrows of a scrollbar
are selected) will also be <strong>-xscrollincrement</strong>.  If the value of
this option is less than or equal to zero, then horizontal scrolling
snaps to the left of an item, or part of an item if items are wider than the
contentbox.

<br><br>
<dt>Command-Line Switch:	<strong>-yscrolldelay</strong><br>
Database Name:	<strong>yScrollDelay</strong><br>
Database Class:	<strong>ScrollDelay</strong><br>
<dd>
This option controls how quickly vertical scrolling occurs while dragging
the mouse with button 1 pressed.
The value should be a list of 1 or 2 integers interpreted as microseconds.
If 2 values are specified, then the first value determines the intial delay 
after the first scroll, and the second value determines the delay for all
scrolling after the first. If only 1 value is specified, each scroll takes
place after that delay.

<br><br>
<dt>Command-Line Switch:	<strong>-yscrollincrement</strong><br>
Database Name:	<strong>yScrollIncrement</strong><br>
Database Class:	<strong>ScrollIncrement</strong><br>
<dd>
Specifies an increment for vertical scrolling, in any of the usual forms
permitted for screen distances.  If the value of this option is greater
than zero, the vertical view in the window will be constrained so that
the y coordinate at the top edge of the window is always an even
multiple of <strong>-yscrollincrement</strong>;  furthermore, the units for scrolling
(e.g., the change in view when the top and bottom arrows of a scrollbar
are selected) will also be <strong>-yscrollincrement</strong>.  If the value of
this option is less than or equal to zero, then vertical scrolling
snaps to the top of an item, or part of an item if items are taller than the
contentbox.
</dl>

<h2><a name="item_and_column_tags">ITEM AND COLUMN TAGS</a></h2>
<p>
Columns and items may have any number of tags associated with them.
A tag is just a string of characters, and it may take any form,
including that of an integer, although the characters '(', ')', '&amp;', '|', '^'
and '!' should be avoided.
<p>
The same tag may be associated with many columns or items. This is commonly done to group
items in various interesting ways; for example, in a file browser all directories
might be given the tag &quot;directory&quot;.
<p>
Tag expressions are used in <a href="#column_description">column descriptions</a>
and <a href="#item_description">item descriptions</a> to specify which columns
and items to operate on.
A tag expression can be a single tag name or a logical expression of tags
using operators '&amp;&amp;', '||', '^' and '!', and parenthesized subexpressions.
For example:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
.t item id &quot;tag {(a &amp;&amp; !b) || (!a &amp;&amp; b)}&quot;
</pre></td></tr></table></p>
or equivalently:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
.t item id &quot;tag {a ^ b}&quot;
</pre></td></tr></table></p>
will return the unique ids of any items with either &quot;a&quot; or &quot;b&quot; tags, but not both.
<p>
Within a tag expression a tag name may be enclosed in double quotes to avoid special
processing of the operator characters. For example:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
.t item id {tag {&quot;a&amp;&amp;b&quot;||c}}
</pre></td></tr></table></p>
will return the unique ids of any items with either &quot;a&amp;&amp;b&quot; or &quot;c&quot; tags; in this
example the &amp;&amp; is not treated as an operator. A double-quote may be escaped within
a quoted tag name using a backslash '\'.
<p>
Tag operators may be bypassed completely by setting the <strong>-columntagexpr</strong> and
<strong>-itemtagexpr</strong> options. This can be useful if your application has column
or item tags containing arbitrary text.
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
.t configure -itemtagexpr false
.t item delete &quot;tag a&amp;&amp;b&quot;
</pre></td></tr></table></p>

<h2><a name="widget_command">WIDGET COMMAND</a></h2>
<p>
The <b class='cmd'>treectrl</b> command creates a new Tcl command whose
name is the same as the path name of the treectrl's window.
This command may be used to invoke various
operations on the widget.  It has the following general form:

<p>
<i class='arg'>pathName</i> <i class='arg'>option</i> ?<i class='arg'>arg arg ...</i>?

<p>
<i class='arg'>PathName</i> is the name of the command, which is the same as
the treectrl widget's path name.  <i class='arg'>Option</i> and the <i class='arg'>arg</i>s
determine the exact behavior of the command.  The following
commands are possible for treectrl widgets:

<dl>

<dt><a name="2"><i class='arg'>pathName</i> <b class='cmd'>activate</b> <i class='arg'>itemDesc</i></a><dd>

Sets the active item to the one described by <i class='arg'>itemDesc</i>,
and switches on the state <strong>active</strong> for this item.
From now on the item can be retrieved with the item description <strong>active</strong>.
An <strong>&lt;ActiveItem&gt;</strong> event is generated.

<br><br>
<dt><a name="3"><i class='arg'>pathName</i> <b class='cmd'>bbox</b> ?<i class='arg'>area</i>?</a><dd>

Returns a list with four elements giving the bounding box (left, top, right
and bottom) of an area of the window. If <i class='arg'>area</i> is not specified, then
the result is the bounding box of the entire window.
If <i class='arg'>area</i> is <strong>content</strong>, then the result is the part of the window
not including borders, headers, or locked columns.
If <i class='arg'>area</i> is <strong>header</strong>, then the result is the part of the window
not including borders where column titles are displayed.
If <i class='arg'>area</i> is <strong>left</strong>, then the result is the part of the window
not including borders or headers where left-locked columns are displayed.
If <i class='arg'>area</i> is <strong>right</strong>, then the result is the part of the window
not including borders or headers where right-locked columns are displayed.
An empty string is returned if the display area has
no height or width, which can be true for various reasons such as the window
is too small, or the header is not displayed, or there aren't any locked
columns.

<br><br>
<dt><a name="4"><i class='arg'>pathName</i> <b class='cmd'>canvasx</b> <i class='arg'>screenx</i></a><dd>

Given a window x-coordinate in the treectrl <i class='arg'>screenx</i>,
this command returns the treectrl x-coordinate
that is displayed at that location.

<br><br>
<dt><a name="5"><i class='arg'>pathName</i> <b class='cmd'>canvasy</b> <i class='arg'>screeny</i></a><dd>

Given a window y-coordinate in the treectrl <i class='arg'>screeny</i>,
this command returns the treectrl y-coordinate
that is displayed at that location.

<br><br>
<dt><a name="6"><i class='arg'>pathName</i> <b class='cmd'>cget</b> <i class='arg'>option</i></a><dd>

Returns the current value of the configuration option given
by <i class='arg'>option</i>.
<i class='arg'>Option</i> may have any of the values accepted by the <b class='cmd'>tree</b>
command.

<br><br>
<dt><a name="7"><i class='arg'>pathName</i> <b class='cmd'>collapse</b> ?<strong>-recurse</strong>? ?<i class='arg'>itemDesc ...</i>?</a><dd>

Use <b class='cmd'>item collapse</b> instead.

<br><br>
<dt><a name="8"><i class='arg'>pathName</i> <b class='cmd'>column</b> <i class='arg'>option</i> <i class='arg'>column</i> ?<i class='arg'>arg ...</i>?</a><dd>

This command is used to manipulate the columns of the treectrl widget
(see section <a href="#columns">COLUMNS</a> below).
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>column</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="9"><i class='arg'>pathName</i> <b class='cmd'>column bbox</b> <i class='arg'>columnDesc</i></a><dd>

Returns a list with four elements giving the bounding box
of the header of the column specified by the
<a href="#column_description">column description</a> <i class='arg'>columnDesc</i>.
If the treectrl is configured not to display the column headers
by means of the <strong>-showheader</strong> option, then
an empty list is returned instead.

<br><br>
<dt><a name="10"><i class='arg'>pathName</i> <b class='cmd'>column cget</b> <i class='arg'>columnDesc</i> <i class='arg'>option</i></a><dd>

This command returns the current value of the option named <i class='arg'>option</i>
for the column specified by the
<a href="#column_description">column description</a> <i class='arg'>columnDesc</i>,
<i class='arg'>ColumnDesc</i> may also be the string <strong>tail</strong> to specify the tail column.
<i class='arg'>Option</i> may have any of the values accepted by the
<b class='cmd'>column configure</b> widget command.

<br><br>
<dt><a name="11"><i class='arg'>pathName</i> <b class='cmd'>column configure</b> <i class='arg'>columnDesc</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command is similar to the <b class='cmd'>configure</b> widget command except
that it modifies options associated with the columns specified by the
<a href="#column_description">column description</a> <i class='arg'>columnDesc</i>
instead of modifying options for the overall treectrl widget.
<i class='arg'>ColumnDesc</i> may be the string <strong>tail</strong> to specify the tail column.
If <i class='arg'>columnDesc</i> refers to more than one column, then at least one option-value pair
must be given.
If no <i class='arg'>option</i> is specified, the command returns a list describing
all of the available options for <i class='arg'>columnDesc</i> (see <strong>Tk_ConfigureInfo</strong>
for information on the format of this list).
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
a list describing the one named option (this list will be identical to
the corresponding sublist of the value returned if no <i class='arg'>option</i>
is specified).
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given option(s) to have the given value(s) for <i class='arg'>columnDesc</i>;
in this case the command returns an empty string.
<br><br>

See <a href="#columns">COLUMNS</a> below for details on the options available for columns.

<br><br>
<dt><a name="12"><i class='arg'>pathName</i> <b class='cmd'>column compare</b> <i class='arg'>column1</i> <i class='arg'>op</i> <i class='arg'>column2</i></a><dd>

For both <a href="#column_description">column descriptions</a> <i class='arg'>column1</i>
and <i class='arg'>column2</i> the index is retrieved
(as returned from the <b class='cmd'>column order</b> widget command).
Then these indexes are compared using the operator <i class='arg'>op</i>, which must
be either <strong>&lt;</strong>,  <strong>&lt;=</strong>,  <strong>==</strong>, <strong>&gt;=</strong>, <strong>&gt;</strong>,
or <strong>!=</strong>.
The return value of this command is 1 if the comparison evaluated to true,
0 otherwise.

<br><br>
<dt><a name="13"><i class='arg'>pathName</i> <b class='cmd'>column count</b> ?<i class='arg'>columnDesc</i>?</a><dd>

If no additional arguments are given, the result is a decimal string giving the number of
columns created by the <b class='cmd'>column create</b> widget command which haven't been
deleted by the <b class='cmd'>column delete</b> widget command; in this case the <strong>tail</strong> column
is not counted.
If <i class='arg'>columnDesc</i> is given, then the result is the number of columns that
match that <a href="#column_description">column description</a>.

<br><br>
<dt><a name="14"><i class='arg'>pathName</i> <b class='cmd'>column create</b> ?<i class='arg'>option value ...</i>?</a><dd>

This command creates a new column in the treectrl widget. The new column is
placed to the right of all other columns (except the <strong>tail</strong> column). Any
<i class='arg'>option</i>-<i class='arg'>value</i> arguments configure the new column according to the
<b class='cmd'>column configure</b> command. The return value is the unique identifier
of the new column.

<br><br>
<dt><a name="15"><i class='arg'>pathName</i> <b class='cmd'>column delete</b> <i class='arg'>first</i> ?<i class='arg'>last</i>?</a><dd>

Deletes the specified column(s). <i class='arg'>First</i> and <i class='arg'>last</i> must be valid
<a href="#column_description">column descriptions</a>. If both <i class='arg'>first</i>
and <i class='arg'>last</i> are specified, then they may refer to a single column only.
The <strong>tail</strong> column cannot be deleted and it is an error to specify it.
The order of <i class='arg'>first</i> and <i class='arg'>last</i> doesn't matter, and <i class='arg'>first</i> may
be equal to <i class='arg'>last</i>.

<br><br>
<dt><a name="16"><i class='arg'>pathName</i> <b class='cmd'>column dragcget</b> <i class='arg'>option</i></a><dd>

<dt><a name="17"><i class='arg'>pathName</i> <b class='cmd'>column dragconfigure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

The user can move a column within a treectrl by drag-and-drop. Feedback consists
of a semi-transparent photo image of the header of the column being dragged
and a 2-pixel-thick vertical line to indicate where the column may be dropped.
The drag image consists of a colored background rectangle plus the image and/or
text displayed in the column header. The 2-pixel-thick line will be drawn
over the left edge of the column before which the dragged column may be dropped.
<br><br>

The library scripts generate a &lt;ColumnDrag-accept&gt; event when the user has
successfully drag-and-drop'd a column. You will have to bind a script to this
event if you want to move the dragged column.
<br><br>

The following configuration options are supported:
<br><br>
<dl>
<dt><strong><strong>-enable</strong></strong> <i class='arg'>boolean</i><dd>
Controls whether the user is allowed to rearrange columns by drag-and-drop.

<br><br>
<dt><strong><strong>-imagealpha</strong></strong> <i class='arg'>alpha</i><dd>
<i class='arg'>Alpha</i> is an integer from 0 (invisible) to 255 (opaque) controlling the
transparency of the drag image. Any value outside this range is clipped.

<br><br>
<dt><strong><strong>-imagecolor</strong></strong> <i class='arg'>background</i><dd>
<i class='arg'>Background</i> is the color of the drag image background rectangle.

<br><br>
<dt><strong><strong>-imagecolumn</strong></strong> <i class='arg'>column</i><dd>
<i class='arg'>Column</i> specifies the column to create the drag image from.

<br><br>
<dt><strong><strong>-imageoffset</strong></strong> <i class='arg'>offset</i><dd>
<i class='arg'>Offset</i> is the horizontal screen distance the drag image is offset from its
starting position.

<br><br>
<dt><strong><strong>-indicatorcolor</strong></strong> <i class='arg'>color</i><dd>
<i class='arg'>Color</i> is the color of the 2-pixel-thick line.

<br><br>
<dt><strong><strong>-indicatorcolumn</strong></strong> <i class='arg'>column</i><dd>
The 2-pixel-thick line will be drawn over the left or right edge of <i class='arg'>column</i>.

<br><br>
<dt><strong><strong>-indicatorside</strong></strong> <i class='arg'>side</i><dd>
Specifies whether the 2-pixel-thick line will be drawn over the <strong>left</strong>
or <strong>right</strong> edge of the column specified by <strong>-indicatorcolumn</strong>.
</dl>

<dt><a name="18"><i class='arg'>pathName</i> <b class='cmd'>column index</b> <i class='arg'>columnDesc</i></a><dd>

Deprecated. Use <b class='cmd'>column id</b> instead.

<br><br>
<dt><a name="19"><i class='arg'>pathName</i> <b class='cmd'>column id</b> <i class='arg'>columnDesc</i></a><dd>

This command resolves the <a href="#column_description">column description</a>
<i class='arg'>columnDesc</i> into a list of unique column identifiers. If the column(s) described by
<i class='arg'>columnDesc</i> don't exist, this command returns an empty list.

<br><br>
<dt><a name="20"><i class='arg'>pathName</i> <b class='cmd'>column list</b> ?<i class='arg'>-visible</i>?</a><dd>

This command returns a list of identifiers for every column (except the tail)
from left to right. If <i class='arg'>-visible</i> is given, only columns whose -visible
option is true are returned.

<br><br>
<dt><a name="21"><i class='arg'>pathName</i> <b class='cmd'>column move</b> <i class='arg'>columnDesc</i> <i class='arg'>beforeDesc</i></a><dd>

Moves the column specified by <i class='arg'>columnDesc</i> to the left of the column
specified by <i class='arg'>beforeDesc</i>. Both <i class='arg'>columnDesc</i> and <i class='arg'>beforeDesc</i>
must be valid <a href="#column_description">column descriptions</a>.
If <i class='arg'>beforeDesc</i> is the string <strong>tail</strong>,
the column <i class='arg'>columnDesc</i> will become the last column.

<br><br>
<dt><a name="22"><i class='arg'>pathName</i> <b class='cmd'>column neededwidth</b> <i class='arg'>columnDesc</i></a><dd>

This command returns a decimal string giving the needed width
of the column specified by the <a href="#column_description">column description</a>
<i class='arg'>columnDesc</i>.
The needed width is the maximum of the width of the column header
and the width of the widest style in any visible item.

<br><br>
<dt><a name="23"><i class='arg'>pathName</i> <b class='cmd'>column order</b> <i class='arg'>columnDesc</i> ?<i class='arg'>-visible</i>?</a><dd>

This command returns a decimal string giving the position of the column
specified by the <a href="#column_description">column description</a>
<i class='arg'>columnDesc</i>
in the list of columns starting from zero for the leftmost column.
If <i class='arg'>-visible</i> is given, only columns whose -visible
option is true are considered, and -1 is returned if <i class='arg'>columnDesc</i>'s -visible
option is false.



<br><br>
<dt><a name="24"><i class='arg'>pathName</i> <b class='cmd'>column tag</b> <i class='arg'>option</i> ?<i class='arg'>arg arg ...</i>?</a><dd>

This command is used to manipulate tags on columns.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>column tag</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="25"><i class='arg'>pathName</i> <b class='cmd'>column tag add</b> <i class='arg'>columnDesc</i> <i class='arg'>tagList</i></a><dd>

Adds each tag in <i class='arg'>tagList</i> to the columns specified by the
<a href="#column_description">column description</a> <i class='arg'>columnDesc</i>.
Duplicate tags are ignored. The list of tags for a column can also be
changed via a column's <strong>-tags</strong> option.

<br><br>
<dt><a name="26"><i class='arg'>pathName</i> <b class='cmd'>column tag expr</b> <i class='arg'>columnDesc</i> <i class='arg'>tagExpr</i></a><dd>

Evaluates the tag expression <i class='arg'>tagExpr</i> against every column
specified by the <a href="#column_description">column description</a>
<i class='arg'>columnDesc</i>. The result is 1 if the tag expression evaluates to true
for every column, 0 otherwise.

<br><br>
<dt><a name="27"><i class='arg'>pathName</i> <b class='cmd'>column tag names</b> <i class='arg'>columnDesc</i></a><dd>

Returns a list of tag names assigned to the columns
specified by the <a href="#column_description">column description</a>
<i class='arg'>columnDesc</i>. The result is the union of any tags assigned to the
columns.

<br><br>
<dt><a name="28"><i class='arg'>pathName</i> <b class='cmd'>column tag remove</b> <i class='arg'>columnDesc</i> <i class='arg'>tagList</i></a><dd>

Removes each tag in <i class='arg'>tagList</i> from the columns specified by the
<a href="#column_description">column description</a> <i class='arg'>columnDesc</i>.
It is not an error if any of the columns do not use any of the tags.
The list of tags for a column can also be changed via a column's
<strong>-tags</strong> option.
</dl>



<dt><a name="29"><i class='arg'>pathName</i> <b class='cmd'>column width</b> <i class='arg'>columnDesc</i></a><dd>

This command returns a decimal string giving the width in pixels
of the column specified by the <a href="#column_description">column description</a>
<i class='arg'>columnDesc</i>,
even if the treectrl is configured to not display the column headers
by means of the <strong>-showheader</strong> option.
</dl>

<dt><a name="30"><i class='arg'>pathName</i> <b class='cmd'>compare</b> <i class='arg'>itemDesc1</i> <i class='arg'>op</i> <i class='arg'>itemDesc2</i></a><dd>

Deprecated. Use the <b class='cmd'>item compare</b> command instead.

<br><br>
<dt><a name="31"><i class='arg'>pathName</i> <b class='cmd'>configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value option value ...</i>?</a><dd>

Query or modify the configuration options of the widget.
If no <i class='arg'>option</i> is specified, returns a list describing all of
the available options for <i class='arg'>pathName</i> (see <strong>Tk_ConfigureInfo</strong> for
information on the format of this list).  If <i class='arg'>option</i> is specified
with no <i class='arg'>value</i>, then the command returns a list describing the
one named option (this list will be identical to the corresponding
sublist of the value returned if no <i class='arg'>option</i> is specified).  If
one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given widget option(s) to have the given value(s);  in
this case the command returns an empty string.
<i class='arg'>Option</i> may have any of the values accepted by the <b class='cmd'>treectrl</b>
command.

<br><br>
<dt><a name="32"><i class='arg'>pathName</i> <b class='cmd'>contentbox</b></a><dd>

Returns a list with four elements giving the bounding box
of the screen area used to display items.
This is the area of the window not including borders, column headers, or
locked columns. An empty string is returned if the display area has
no height or width, which can happen if the window is too small.

<br><br>
<dt><a name="33"><i class='arg'>pathName</i> <b class='cmd'>debug</b> <i class='arg'>option</i> ?<i class='arg'>arg arg ...</i>?</a><dd>

This command is used to facilitate debugging of the treectrl widget.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>debug</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="34"><i class='arg'>pathName</i> <b class='cmd'>debug alloc</b></a><dd>

Returns a string giving partial statistics on memory allocations, if the package
was built with TREECTRL_DEBUG defined.

<br><br>
<dt><a name="35"><i class='arg'>pathName</i> <b class='cmd'>debug cget</b> <i class='arg'>option</i></a><dd>

This command returns the current value of the debugging option
named <i class='arg'>option</i>.
<i class='arg'>Option</i> may have any of the values accepted by the
<b class='cmd'>debug configure</b> widget command.

<br><br>
<dt><a name="36"><i class='arg'>pathName</i> <b class='cmd'>debug configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command is similar to the <b class='cmd'>configure</b> widget command except
that it modifies debugging options
instead of modifying options for the overall treectrl widget.
If no <i class='arg'>option</i> is specified, the command returns a list describing
all of the available debugging options (see <strong>Tk_ConfigureInfo</strong>
for information on the format of this list).
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
a list describing the one named option (this list will be identical to
the corresponding sublist of the value returned if no <i class='arg'>option</i>
is specified).
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given debugging option(s) to have the given value(s);
in this case the command returns an empty string.
<br><br>

The following debugging options are supported:
<br><br>
<dl>
<dt><strong><strong>-displaydelay</strong></strong> <i class='arg'>millis</i><dd>
Specifies a time duration in milliseconds, which should be waited
after something has been drawn to the screen.
Setting this option has only an effect, if the
debugging options <strong>-enable</strong> and <strong>-display</strong> are switched on.

<br><br>
<dt><strong><strong>-data</strong></strong> <i class='arg'>boolean</i><dd>
If this option is switched on
(together with the debugging option <strong>-enable</strong>),
at various places a consistence check
on the internal data structure is made
(e.g. for every item is checked,
if the registered number of children is equal to the number of child items).
If an inconsistency was found, a Tcl background error is raised.

<br><br>
<dt><strong><strong>-display</strong></strong> <i class='arg'>boolean</i><dd>
If this option is switched on
(together with the debugging option <strong>-enable</strong>),
at varios places additional debugging output is printed to stdout.

<br><br>
<dt><strong><strong>-drawcolor</strong></strong> <i class='arg'>color</i><dd>
When specified, areas of the window are painted with this color when drawing
in those areas is about to occur.
Setting this option has only an effect if the
debugging options <strong>-enable</strong> and <strong>-display</strong> are switched on.

<br><br>
<dt><strong><strong>-enable</strong></strong> <i class='arg'>boolean</i><dd>
All other debugging options only take effect
if this option is also switched on.

<br><br>
<dt><strong><strong>-erasecolor</strong></strong> <i class='arg'>color</i><dd>
When specified, areas of the window which have been marked as &quot;invalid&quot;
(for example, when part of the window is exposed) are
painted with this color.
If you use an unusual color for this option (like <strong>pink</strong>),
superflous screen redraws can be spotted more easily.
Setting this option has only an effect if the
debugging options <strong>-enable</strong> and <strong>-display</strong> are switched on.

<br><br>
<dt><strong><strong>-span</strong></strong> <i class='arg'>boolean</i><dd>
Debugging related to column spanning.

<br><br>
<dt><strong><strong>-textlayout</strong></strong> <i class='arg'>boolean</i><dd>
Debugging related to text-element layout.

</dl>

<dt><a name="37"><i class='arg'>pathName</i> <b class='cmd'>debug dinfo</b> <i class='arg'>option</i></a><dd>

Returns a string describing display-related stuff. <i class='arg'>Option</i> must be one
of <strong>alloc</strong>, <strong>ditem</strong>, <strong>onscreen</strong> or <strong>range</strong>.

<br><br>
<dt><a name="38"><i class='arg'>pathName</i> <b class='cmd'>debug expose</b> <i class='arg'>x1</i> <i class='arg'>y1</i> <i class='arg'>x2</i> <i class='arg'>y2</i></a><dd>

Causes the area of the window bounded by the given window-coords to be
marked as invalid. This simulates uncovering part of the window.

<br><br>
<dt><a name="39"><i class='arg'>pathName</i> <b class='cmd'>debug scroll</b></a><dd>

Returns a string useful for debugging vertical scrolling.
</dl>

<dt><a name="40"><i class='arg'>pathName</i> <b class='cmd'>depth</b> ?<i class='arg'>itemDesc</i>?</a><dd>

If the additional argument <i class='arg'>itemDesc</i> is given,
then the result is a decimal string giving the depth of
the item described by <i class='arg'>itemDesc</i>.
If no <i class='arg'>itemDesc</i> is specified, then the maximum depth of all
items in the treectrl widget is returned instead.
Depth is defined as the number of ancestors an item has.

<br><br>
<dt><a name="41"><i class='arg'>pathName</i> <b class='cmd'>dragimage</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a><dd>

This command is used to manipulate the dragimage,
one or more dotted lines around rectangular regions of the treectrl widget.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>dragimage</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="42"><i class='arg'>pathName</i> <b class='cmd'>dragimage add</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>element</i>?</a><dd>

Adds the shapes of the item described by <i class='arg'>itemDesc</i>
to the shapes of the dragimage.
Specifying additional arguments reduces
the number of rectangles that are added to the dragimage.
If no additional arguments is specified,
for every element of the item in every column a dotted rectangles is added.
If <i class='arg'>column</i> is specified, all elements in other columns are ignored.
If also <i class='arg'>element</i> is specified, only a rectangle for this one element
of the specified item in the given column is added.

<br><br>
<dt><a name="43"><i class='arg'>pathName</i> <b class='cmd'>dragimage cget</b> <i class='arg'>option</i></a><dd>

This command returns the current value of the dragimage option
named <i class='arg'>option</i>.
<i class='arg'>Option</i> may have any of the values accepted by the
<b class='cmd'>dragimage configure</b> widget command.

<br><br>
<dt><a name="44"><i class='arg'>pathName</i> <b class='cmd'>dragimage clear</b></a><dd>

Removes all shapes (if there are any) from the dragimage.
This command does not modify the dragimage offset.

<br><br>
<dt><a name="45"><i class='arg'>pathName</i> <b class='cmd'>dragimage configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command is similar to the <b class='cmd'>configure</b> widget command except
that it modifies the dragimage options
instead of modifying options for the overall treectrl widget.
If no <i class='arg'>option</i> is specified, the command returns a list describing
all of the available dragimage options (see <strong>Tk_ConfigureInfo</strong>
for information on the format of this list).
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
a list describing the one named dragimage option (this list will be identical
to the corresponding sublist of the value returned if no <i class='arg'>option</i>
is specified).
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given dragimage option(s) to have the given value(s);
in this case the command returns an empty string.
<br><br>

The following dragimage options are supported:

<br><br>
<dl>
<dt><strong><strong>-visible</strong></strong> <i class='arg'>boolean</i><dd>
Specifies a boolean value which determines
whether the dragimage should currently be visible.
</dl>

<dt><a name="46"><i class='arg'>pathName</i> <b class='cmd'>dragimage offset</b> ?<i class='arg'>x y</i>?</a><dd>

Returns a list containing the x and y offsets of the dragimage,
if no additional arguments are specified.
The dragimage offset is the screen distance, the image is displayed
relative to the item its shape is derived from.
If two coordinates are specified,
sets the dragimage offset to the given coordinates <i class='arg'>x</i> and <i class='arg'>y</i>.

</dl>

<dt><a name="47"><i class='arg'>pathName</i> <b class='cmd'>element</b> <i class='arg'>option</i> ?<i class='arg'>element</i>? ?<i class='arg'>arg arg ...</i>?</a><dd>

This command is used to manipulate elements (see <a href="#elements">ELEMENTS</a> below).
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>element</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="48"><i class='arg'>pathName</i> <b class='cmd'>element cget</b> <i class='arg'>element</i> <i class='arg'>option</i></a><dd>

This command returns the current value of the option named <i class='arg'>option</i>
associated with the element given by <i class='arg'>element</i>.
<i class='arg'>Option</i> may have any of the values accepted by the
<b class='cmd'>element configure</b> widget command.

<br><br>
<dt><a name="49"><i class='arg'>pathName</i> <b class='cmd'>element configure</b> <i class='arg'>element</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command is similar to the <b class='cmd'>configure</b> widget command except
that it modifies options associated with the element given by <i class='arg'>element</i>
instead of modifying options for the overall treectrl widget.
If no <i class='arg'>option</i> is specified, the command returns a list describing
all of the available options for <i class='arg'>element</i> (see <strong>Tk_ConfigureInfo</strong>
for information on the format of this list).
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
a list describing the one named option (this list will be identical to
the corresponding sublist of the value returned if no <i class='arg'>option</i>
is specified).
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given option(s) to have the given value(s) in <i class='arg'>element</i>;
in this case the command returns an empty string.
See <a href="#elements">ELEMENTS</a> below for details on the options available for elements.

<br><br>
<dt><a name="50"><i class='arg'>pathName</i> <b class='cmd'>element create</b> <i class='arg'>element</i> <i class='arg'>type</i> ?<i class='arg'>option value ...</i>?</a><dd>

Create a new elememt in <i class='arg'>pathName</i> of type <i class='arg'>type</i>
with name <i class='arg'>element</i>.
The exact format of the arguments after <i class='arg'>type</i> depends on <i class='arg'>type</i>,
but generally consist of specifications for zero or more element options.
See the subsections on individual element types below for more
on the syntax of this command.
This command returns the name for the new element.

<br><br>
<dt><a name="51"><i class='arg'>pathName</i> <b class='cmd'>element delete</b> ?<i class='arg'>element ...</i>?</a><dd>

Deletes each of the named elements and returns an empty string.
If an element is deleted while it is still configured
as an element of one or more styles
by means of the <b class='cmd'>style elements</b> widget command,
it is also removed from the element lists of these styles.

<br><br>
<dt><a name="52"><i class='arg'>pathName</i> <b class='cmd'>element names</b></a><dd>

Returns a list containing the names of all existing elements.

<br><br>
<dt><a name="53"><i class='arg'>pathName</i> <b class='cmd'>element perstate</b> <i class='arg'>element</i> <i class='arg'>option</i> <i class='arg'>stateList</i></a><dd>

This command returns the value of the <a href="#per-state_options">per-state</a>
option named <i class='arg'>option</i> for <i class='arg'>element</i> for a certain state.
<i class='arg'>StateList</i> is a list of state names (static and dynamic, see <a href="#states">STATES</a>)
which specifies the state to use.

<br><br>
<dt><a name="54"><i class='arg'>pathName</i> <b class='cmd'>element type</b> <i class='arg'>element</i></a><dd>

Returns the type of the element given by <i class='arg'>element</i>,
such as <strong>rect</strong> or <strong>text</strong>.
</dl>

<dt><a name="55"><i class='arg'>pathName</i> <b class='cmd'>expand</b> ?<strong>-recurse</strong>? ?<i class='arg'>itemDesc ...</i>?</a><dd>

Use <b class='cmd'>item expand</b> instead.

<br><br>
<dt><a name="56"><i class='arg'>pathName</i> <b class='cmd'>identify</b> <i class='arg'>x</i> <i class='arg'>y</i></a><dd>

Returns a list describing what
is displayed at the given window coordinates <i class='arg'>x</i> and <i class='arg'>y</i>.
If the coordinates are outside the window, over the borders, or over any
whitespace in the window, then the result is an empty string;
otherwise the first word of the result is <strong>header</strong> or <strong>item</strong>.
<br><br>

If the coordinates are over a column header, then
the first word of the result is <strong>header</strong>, followed by
the unique id of the column (or the string <strong>tail</strong>).
If the x coordinate is near the left or right end of a column, then
a third word <strong>left</strong> or <strong>right</strong> is appended to the result.
<br><br>

If the coordinates are over an item, then the first word of the result
is <strong>item</strong> followed by the unique id of that item.
If the coordinates are not over the area for displaying buttons and lines,
then <strong>column</strong> and a unique column id are the
3rd and 4th words of the result. If the coordinates are over an element within
that column, then <strong>element</strong> and an element name are the 5th and 6th
words of the result.
<br><br>

If the coordinates are over a button, then the first word of the result is
<strong>item</strong>, followed by the unique id of that item, followed by the word
<strong>button</strong>.
<br><br>
If the coordinates are over a line descending from an ancestor of an item
(but not the parent of that item), then the first word of the result is
<strong>item</strong>, followed by the unique id of that item, followed by the word
<strong>line</strong>, followed by the unique id of the item the line is coming
from. This is used to collapse the ancestor when the line is clicked on.

<br><br>
<dt><a name="57"><i class='arg'>pathName</i> <b class='cmd'>index</b> <i class='arg'>itemDesc</i></a><dd>

Deprecated. Use <b class='cmd'>item id</b> instead.

<br><br>
<dt><a name="58"><i class='arg'>pathName</i> <b class='cmd'>item</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a><dd>

This command is used to manipulate items.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>item</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="59"><i class='arg'>pathName</i> <b class='cmd'>item ancestors</b> <i class='arg'>itemDesc</i></a><dd>

Returns a list containing the item ids of the ancestors
of the item specified by <i class='arg'>itemDesc</i>. The first list value is the parent,
the second is the parent's parent, an so on. The last list value will be the
root item if <i class='arg'>itemDesc</i> is a descendant of the root item.

<br><br>
<dt><a name="60"><i class='arg'>pathName</i> <b class='cmd'>item bbox</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>element</i>?</a><dd>

Returns a list with four elements giving the bounding box
of the item described by <i class='arg'>itemDesc</i>.
If no further argument is specified, the bbox spans the area of the item
over all non-locked columns. If a <i class='arg'>column</i> is specified, only the area of the item
in this column is considered. If an additional <i class='arg'>element</i> is specified,
the area of this <i class='arg'>element</i> in <i class='arg'>column</i> of the specified item is
returned.

<br><br>
<dt><a name="61"><i class='arg'>pathName</i> <b class='cmd'>item cget</b> <i class='arg'>itemDesc</i> <i class='arg'>option</i></a><dd>

Returns the current value of the configuration option for the item specified by
<i class='arg'>itemDesc</i> whose name is <i class='arg'>option</i>. <i class='arg'>Option</i> may have any of the
values accepted by the <b class='cmd'>item configure</b> command.

<br><br>
<dt><a name="62"><i class='arg'>pathName</i> <b class='cmd'>item children</b> <i class='arg'>itemDesc</i></a><dd>

Returns a list containing the item ids of all children
of the item specified by <i class='arg'>itemDesc</i> in the correct order from
the first child to the last child.

<br><br>
<dt><a name="63"><i class='arg'>pathName</i> <b class='cmd'>item collapse</b> <i class='arg'>itemDesc</i> ?<strong>-recurse</strong>?</a><dd>

Switches off the <strong>open</strong> state of the item(s) described by <i class='arg'>itemDesc</i>.
If an item has descendants, then they are no longer displayed.
If an item is already closed, then this command has no effect on that item.
If <strong>-recurse</strong> is specified, then all descendants of the items described
by <i class='arg'>itemDesc</i> will also be collapsed.
For every item that actually will be collapsed, two events are generated:
a <strong>&lt;Collapse-before&gt;</strong> event before the item state is changed,
and a <strong>&lt;Collapse-after&gt;</strong> event after the item state was changed.

<br><br>
<dt><a name="64"><i class='arg'>pathName</i> <b class='cmd'>item compare</b> <i class='arg'>itemDesc1</i> <i class='arg'>op</i> <i class='arg'>itemDesc2</i></a><dd>

From both items described by the <i class='arg'>itemDesc</i>s the index is retrieved
(as returned from the <b class='cmd'>item order</b> widget command).
Then these indexes are compared using the operator <i class='arg'>op</i>, which must
be either <strong>&lt;</strong>,  <strong>&lt;=</strong>,  <strong>==</strong>, <strong>&gt;=</strong>, <strong>&gt;</strong>,
or <strong>!=</strong>.
The return value of this command is 1 if the comparison evaluated to true,
0 otherwise.

<br><br>
<dt><a name="65"><i class='arg'>pathName</i> <b class='cmd'>item complex</b> <i class='arg'>itemDesc</i> ?<i class='arg'>list...</i>?</a><dd>

This horrible command is now deprecated. Use <b class='cmd'>item element configure</b>
instead. For every column of the treectrl there may be specified one <i class='arg'>list</i>.
Each <i class='arg'>list</i> should look like this:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
{ {element option value ...} {element option value ...} ...}
</pre></td></tr></table></p>
Every <i class='arg'>option</i> must be known by the element's type
(see <a href="#elements">ELEMENTS</a> below).
Each <i class='arg'>option</i> will be set to <i class='arg'>value</i> for the element in this
one column in this item.

<br><br>
<dt><a name="66"><i class='arg'>pathName</i> <b class='cmd'>item configure</b> <i class='arg'>itemDesc</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

If no <i class='arg'>option</i> is specified, returns a list describing all of the available
options for the item given by <i class='arg'>itemDesc</i> (see <strong>Tk_ConfigureInfo</strong> for
information on the format of this list). If <i class='arg'>option</i> is specified with no
value, then the command returns a list describing the one named option (this
list will be identical to the corresponding sublist of the value returned if
no <i class='arg'>option</i> is specified).
<br><br>
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs
are specified, then the command modifies the given item option(s) to have the
given value(s); in this case the command returns an empty string. This is the
only case where <i class='arg'>itemDesc</i> may refer to multiple items.
<br><br>
The following options are supported by this command (see <b class='cmd'>item create</b> for
the meaning of each option):

<br><br>
<dl>

<dt><strong><strong>-button</strong></strong> <i class='arg'>boolean|auto</i><dd>
<dt><strong><strong>-height</strong></strong> <i class='arg'>height</i><dd>
<dt><strong><strong>-tags</strong></strong> <i class='arg'>tagList</i><dd>
<dt><strong><strong>-visible</strong></strong> <i class='arg'>boolean</i><dd>

</dl>

<dt><a name="67"><i class='arg'>pathName</i> <b class='cmd'>item count</b> ?<i class='arg'>itemDesc</i>?</a><dd>

If no additional arguments are given, the result is a decimal string giving the number of
items created by the <b class='cmd'>item create</b> widget command which haven't been
deleted by the <b class='cmd'>item delete</b> widget command, plus 1 for the ever-present
root item.
If the optional argument <i class='arg'>itemDesc</i> is given, then the result is the
number of items that match that <a href="#item_description">item description</a>.

<br><br>
<dt><a name="68"><i class='arg'>pathName</i> <b class='cmd'>item create</b> ?<i class='arg'>option value ...</i>?</a><dd>

Creates some new items and optionally returns a list of unique identifiers for
those items.
The new items have the states <strong>open</strong> and <strong>enabled</strong> set by default.
If the treectrl widget currently has the focus,
the state <strong>focus</strong> is also set.
<br><br>
The following options are supported by this command:

<br><br>
<dl>

<dt><strong><strong>-button</strong></strong> <i class='arg'>boolean|auto</i><dd>
The value of this option must have one of the forms accepted by <strong>Tcl_GetBoolean</strong>
or be the word <strong>auto</strong> (or any abbreviation of it). It indicates whether or not an expand/collapse
button should be drawn next to the item, typically to indicate that the item has
children.
If the value of this option is <strong>auto</strong>, then a button is displayed next to the
item whenever the item has any children whose item option <strong>-visible</strong> is true.
The button will only be displayed if:
<br><br>
<ol>
<li>
the column specified by the treectrl option <strong>-treecolumn</strong> is visible, and
<br><br>
<li>
the treectrl option <strong>-showbuttons</strong> is true, and
<br><br>
<li>
for the root item, the treectrl option <strong>-showrootbutton</strong> is true.
</ol>

<dt><strong><strong>-count</strong></strong> <i class='arg'>numItems</i><dd>
Specifies the number of items to create. Must be &gt;= 0. Defaults to 1.

<br><br>
<dt><strong><strong>-height</strong></strong> <i class='arg'>height</i><dd>
Specifies a fixed height in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
Must be &gt;= 0. If <i class='arg'>height</i> is zero then the item's height is unspecified.
Defaults to 0.

<br><br>
<dt><strong><strong>-nextsibling</strong></strong> <i class='arg'>itemDesc</i><dd>
Specifies the item before which the new items will be inserted. The new items
will have the same parent as <i class='arg'>itemDesc</i>.

<br><br>
<dt><strong><strong>-open</strong></strong> <i class='arg'>boolean</i><dd>
Specifies whether the items should be open or closed. Default is true.

<br><br>
<dt><strong><strong>-parent</strong></strong> <i class='arg'>itemDesc</i><dd>
Specifies the item which the new items will be the children of. The new items
will be appended to the list of children of <i class='arg'>itemDesc</i>.

<br><br>
<dt><strong><strong>-prevsibling</strong></strong> <i class='arg'>itemDesc</i><dd>
Specifies the item after which the new items will be inserted. The new items
will have the same parent as <i class='arg'>itemDesc</i>.

<br><br>
<dt><strong><strong>-returnid</strong></strong> <i class='arg'>boolean</i><dd>
Specifies whether or not to return a list of item identifiers for the newly
created items. Specifying false is useful when creating a large number of items in the
console or to improve performance. Default is true.

<br><br>
<dt><strong><strong>-tags</strong></strong> <i class='arg'>tagList</i><dd>
<i class='arg'>TagList</i> is a list of tag names to be added to the new items.

<br><br>
<dt><strong><strong>-visible</strong></strong> <i class='arg'>boolean</i><dd>
<i class='arg'>Boolean</i> must have one of the forms accepted by <strong>Tcl_GetBoolean</strong>. It
indicates that the item should be displayed in the list. The item will only be
displayed if:
a) each ancestor is a descendant of the root item (not an orphan);
and b) each ancestor's <strong>-visible</strong> option is true 

</dl>

<dt><a name="69"><i class='arg'>pathName</i> <b class='cmd'>item delete</b> <i class='arg'>first</i> ?<i class='arg'>last</i>?</a><dd>

Deletes the specified item(s).
<i class='arg'>First</i> and <i class='arg'>last</i> must be valid
<a href="#item_description">item descriptions</a>.
If <i class='arg'>last</i> isn't specified, then <i class='arg'>first</i> may specify multiple items.
If both <i class='arg'>first</i> and <i class='arg'>last</i> are specified,
they must each decribe a single item with a common ancestor;
then the range of items between <i class='arg'>first</i> and <i class='arg'>last</i> is deleted.
The order of <i class='arg'>first</i> and <i class='arg'>last</i> doesn't matter.
<br><br>
Deleting an item deletes any child items of the deleted item recursively.
If the current <strong>active</strong> item is deleted, the root item becomes the new active item.
If the current selection <strong>anchor</strong> item is deleted, the root item becomes the new anchor item.
There is no way to delete the root item of the treectrl widget;
in all cases the specification of the root item is ignored.
<br><br>
For each call to this command, two events may be generated.
If any of the deleted items are selected, then a <strong>&lt;Selection&gt;</strong> event
is generated just before the items are deleted.
If any items are going to be deleted, then an <strong>&lt;ItemDelete&gt;</strong> event event is generated just before the items
are deleted.

<br><br>
<dt><a name="70"><i class='arg'>pathName</i> <b class='cmd'>item descendants</b> <i class='arg'>itemDesc</i></a><dd>

Returns a list containing the item ids of the descendants
of the item specified by <i class='arg'>itemDesc</i>, i.e. the children, grandchildren,
great-grandchildren etc, of the item.

<br><br>
<dt><a name="71"><i class='arg'>pathName</i> <b class='cmd'>item dump</b> <i class='arg'>itemDesc</i></a><dd>

Returns a list with 4 words in the form
<strong>index</strong> <em>index</em> <strong>indexVis</strong> <em>indexVis</em>.

<br><br>
<dt><a name="72"><i class='arg'>pathName</i> <b class='cmd'>item element</b> <i class='arg'>command</i> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> ?<i class='arg'>arg ...</i>?</a><dd>

This command is used to manipulate elements of the item.
The exact behavior of the command depends on the <i class='arg'>command</i> argument
that follows the <b class='cmd'>element</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="73"><i class='arg'>pathName</i> <b class='cmd'>item element actual</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> <i class='arg'>option</i></a><dd>

Deprecated. Use <b class='cmd'>item element perstate</b> instead.

<br><br>
<dt><a name="74"><i class='arg'>pathName</i> <b class='cmd'>item element cget</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> <i class='arg'>option</i></a><dd>

This command returns the value of the option named <i class='arg'>option</i>
associated with <i class='arg'>element</i> inside <i class='arg'>column</i> of the item described by
<i class='arg'>itemDesc</i>, if it was already configured for the actual item.
<i class='arg'>Option</i> may have any of the values accepted by the type of the
specified element (see <a href="#elements">ELEMENTS</a> below)

<br><br>
<dt><a name="75"><i class='arg'>pathName</i> <b class='cmd'>item element configure</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command modifies configuration options for an element in a column of
an item.
If no <i class='arg'>option</i> is specified, the command returns a list describing
all of the available options for the element (see <strong>Tk_ConfigureInfo</strong>
for information on the format of this list).
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
a list describing the one named option (this list will be identical to
the corresponding sublist of the value returned if no <i class='arg'>option</i>
is specified).
<br><br>
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given option(s) to have the given value(s) in the
<i class='arg'>element</i> inside <i class='arg'>column</i> of the item(s) described by <i class='arg'>itemDesc</i>;
in this case the command returns an empty string. This is the only case where
<i class='arg'>itemDesc</i> may refer to multiple items.
<br><br>
It is possible to configure multiple elements in multiple columns with
a single call. To configure another element in the same column, append a
'<strong>+</strong>' argument followed by the element name. To configure elements in
another column, append a '<strong>,</strong>' argument followed by the column.
For example:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
.t item element configure $I \
	$C1 $E1 -text &quot;hello&quot; + $E2 -text &quot;world&quot; , \
	$C2 $E3 -fill Blue , \
	$C3 $E1 -text &quot;apples and oranges&quot;
</pre></td></tr></table></p>
Each of the <a href="#column_description">column description</a> arguments
to this command may refer to multiple columns if at least one
<i class='arg'>option</i>-<i class='arg'>value</i> pair is given.

<br><br>
<dt><a name="76"><i class='arg'>pathName</i> <b class='cmd'>item element perstate</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>element</i> <i class='arg'>option</i> ?<i class='arg'>stateList</i>?</a><dd>

This command returns the current value of the <a href="#per-state_options">per-state</a>
option named <i class='arg'>option</i> for <i class='arg'>element</i> inside <i class='arg'>column</i> of the item described by
<i class='arg'>itemDesc</i>. If <i class='arg'>stateList</i> is specified, the list of state names (static
and dynamic, see <a href="#states">STATES</a>) is used in place of the current state for
<i class='arg'>item</i> and <i class='arg'>column.</i>

</dl>

<dt><a name="77"><i class='arg'>pathName</i> <b class='cmd'>item enabled</b> <i class='arg'>itemDesc</i> ?<i class='arg'>boolean</i>?</a><dd>

Returns 1 if the item described by <i class='arg'>itemDesc</i> has the
state <strong>enabled</strong> switched on, 0 otherwise. If <i class='arg'>boolean</i> is specified,
then the <strong>enabled</strong> state of every item described by the
<a href="#item_description">item description</a> <i class='arg'>itemDesc</i> is set accordingly.
All items are enabled when first created. Disabled items cannot be selected,
and are ignored by the default key-navigation and mouse bindings.

<br><br>
<dt><a name="78"><i class='arg'>pathName</i> <b class='cmd'>item expand</b> <i class='arg'>itemDesc</i> ?<strong>-recurse</strong>?</a><dd>

Switches on the <strong>open</strong> state of the item(s) described by <i class='arg'>itemDesc</i>.
If an item has descendants, then they are now displayed.
If an item is already open, then this command has no effect on that item.
If <strong>-recurse</strong> is specified, then all descendants of the items described by
<i class='arg'>itemDesc</i> will also be expanded.
For every item that actually will be expanded, two events are generated:
an <strong>&lt;Expand-before&gt;</strong> event before the item state is changed,
and an <strong>&lt;Expand-after&gt;</strong> event after the item state was changed.

<br><br>
<dt><a name="79"><i class='arg'>pathName</i> <b class='cmd'>item firstchild</b> <i class='arg'>parent</i> ?<i class='arg'>child</i>?</a><dd>

If <i class='arg'>child</i> is not specified, returns the item id of the first
child of the item described by <i class='arg'>parent</i>.
If <i class='arg'>child</i> is specified, it must describe an item
that is neither the root item nor an ancestor of <i class='arg'>parent</i>.
Then it will become the new first child of <i class='arg'>parent</i>.

<br><br>
<dt><a name="80"><i class='arg'>pathName</i> <b class='cmd'>item id</b> <i class='arg'>itemDesc</i></a><dd>

This command resolves the <a href="#item_description">item description</a>
<i class='arg'>itemDesc</i> into a list of unique item identifiers. If <i class='arg'>itemDesc</i>
doesn't refer to any existing items, then this command returns an empty list.

<br><br>
<dt><a name="81"><i class='arg'>pathName</i> <b class='cmd'>item image</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>image</i>? ?<i class='arg'>column image ...</i>?</a><dd>

This command sets or retrieves the value of the <a href="#per-state_options">per-state</a>
-image option for the first image element in one or more columns.

If no <i class='arg'>column</i> is specified, this command returns a list of values,
one per column.

If no <i class='arg'>image</i> is specified, this command returns the value for <i class='arg'>column</i>.
<br><br>
If one or more <i class='arg'>column</i>-<i class='arg'>image</i> pairs is specified,
then the value of the -image option in each <i class='arg'>column</i> is set to <i class='arg'>image</i>.
In this case <i class='arg'>itemDesc</i> may refer to multiple items and each <i class='arg'>column</i>
may refer to multiple columns.
<br><br>
Note that this command is provided as a convenience. Use the
<b class='cmd'>item element configure</b> or <b class='cmd'>item element cget</b> commands if you want
to set or retrieve the value of the -image option for a specific image element.

<br><br>
<dt><a name="82"><i class='arg'>pathName</i> <b class='cmd'>item isancestor</b> <i class='arg'>itemDesc</i> <i class='arg'>descendant</i></a><dd>

Returns 1 if the item described by <i class='arg'>itemDesc</i> is a direct or indirect
parent of the item decribed by <i class='arg'>descendant</i>, 0 otherwise.

<br><br>
<dt><a name="83"><i class='arg'>pathName</i> <b class='cmd'>item isopen</b> <i class='arg'>itemDesc</i></a><dd>

Returns 1 if the item described by <i class='arg'>itemDesc</i> has the
state <strong>open</strong> switched on, 0 otherwise.

<br><br>
<dt><a name="84"><i class='arg'>pathName</i> <b class='cmd'>item lastchild</b> <i class='arg'>parent</i> ?<i class='arg'>child</i>?</a><dd>

If <i class='arg'>child</i> is not specified, returns the item id of the last
child of the item described by <i class='arg'>parent</i>.
If <i class='arg'>child</i> is specified, it must describe an item
that is not an ancestor of <i class='arg'>parent</i>.
Then it will become the new last child of <i class='arg'>parent</i>.

<br><br>
<dt><a name="85"><i class='arg'>pathName</i> <b class='cmd'>item nextsibling</b> <i class='arg'>sibling</i> ?<i class='arg'>next</i>?</a><dd>

If <i class='arg'>next</i> is not specified, returns the item id of the next
sibling of the item described by <i class='arg'>sibling</i>.
If <i class='arg'>next</i> is specified, it must describe an item
that is not an ancestor of <i class='arg'>sibling</i>.
Then it will become the new next sibling of <i class='arg'>sibling</i>.

<br><br>
<dt><a name="86"><i class='arg'>pathName</i> <b class='cmd'>item numchildren</b> <i class='arg'>itemDesc</i></a><dd>

Returns the number of children of the item described by <i class='arg'>itemDesc</i>.

<br><br>
<dt><a name="87"><i class='arg'>pathName</i> <b class='cmd'>item order</b> <i class='arg'>itemDesc</i> ?<i class='arg'>-visible</i>?</a><dd>

This command returns the position of the item <i class='arg'>itemDesc</i> relative to
its toplevel ancestor (usually the root item, unless the ancestor is an
orphan). If you imagine all the items flattened into a vertical list, the
result of this command is the row the item falls in. If the optional argument
<i class='arg'>-visible</i> is given, only the items whose ancestors are expanded, and whose
-visible option is true, get counted; in this case -1 is returned if the item
is not visible.

<br><br>
<dt><a name="88"><i class='arg'>pathName</i> <b class='cmd'>item parent</b> <i class='arg'>itemDesc</i></a><dd>

Returns the item id of the parent of the item
described by <i class='arg'>itemDesc</i>.

<br><br>
<dt><a name="89"><i class='arg'>pathName</i> <b class='cmd'>item prevsibling</b> <i class='arg'>sibling</i> ?<i class='arg'>prev</i>?</a><dd>

If <i class='arg'>prev</i> is not specified, returns the item id of the previous
sibling of the item described by <i class='arg'>sibling</i>.
If <i class='arg'>prev</i> is specified, it must describe an item
that is not an ancestor of <i class='arg'>sibling</i>.
Then it will become the new previous sibling of <i class='arg'>sibling</i>.

<br><br>
<dt><a name="90"><i class='arg'>pathName</i> <b class='cmd'>item range</b> <i class='arg'>first</i> <i class='arg'>last</i></a><dd>

Returns a list containing the item ids of all items
in the range between <i class='arg'>first</i> and <i class='arg'>last</i>, inclusive.
The order between <i class='arg'>first</i> and <i class='arg'>last</i> doesn't matter,
and the result is always sorted by the increasing order of the items (as
returned by the <b class='cmd'>item order</b> command).
The items specified by <i class='arg'>first</i> and <i class='arg'>last</i> must share a common
ancestor.

<br><br>
<dt><a name="91"><i class='arg'>pathName</i> <b class='cmd'>item remove</b> <i class='arg'>itemDesc</i></a><dd>

Removes the item described by <i class='arg'>itemDesc</i>
from the list of children of its parent, so that it will become an orphan.

<br><br>
<dt><a name="92"><i class='arg'>pathName</i> <b class='cmd'>item rnc</b> <i class='arg'>itemDesc</i></a><dd>

Returns a list of two integers, which corresponds to the row and column
of the item described by <i class='arg'>itemDesc</i>. The row and column corresponds to
the on-screen arrangement of items as determined by the -orient and -wrap
options. If the item is not displayed, this command returns an empty string.

<br><br>
<dt><a name="93"><i class='arg'>pathName</i> <b class='cmd'>item sort</b> <i class='arg'>itemDesc</i> ?<i class='arg'>option ...</i>?</a><dd>

Sorts the children of the item described by <i class='arg'>itemDesc</i>,
and redisplays the tree with the items in the new order.
<br><br>

The range of items which should be sorted can be restricted
by means of the <strong>-first</strong> and/or <strong>-last</strong> options,
which should be children of the item described by <i class='arg'>itemDesc</i>;
the order between these two limiting items doesn't matter.
<br><br>

The sort column can be specified by means of the <strong>-column</strong> option;
this option can be used repeatedly to define a multicolumn sort.
The sorting is done by looking at the <i class='arg'>text</i>
of the element specified by the <strong>-element</strong> option,
which must be a text element defined in the style of the sorting column,
by default the first text element is used.
<br><br>

If the <strong>-notreally</strong> option is specified,
no rearranging of the items is done;
instead the sorted items are returned as result of the command.
<br><br>

By default ASCII sorting is used with the result returned in increasing order.
Any of the following options may be specified to control
the sorting process of the previously specified column
(unique abbreviations are accepted):

<br><br>
<dl>
<dt><strong><strong>-ascii</strong></strong><dd>
Use string comparison with ASCII collation order. This is the default.

<br><br>
<dt><strong><strong>-command</strong></strong> <i class='arg'>command</i><dd>
Use <i class='arg'>command</i> as a comparison command.
To compare two items, evaluate a Tcl script consisting of
<i class='arg'>command</i> with the numerical ids of the two items appended as additional
arguments.  The script should return an integer less than,
equal to, or greater than zero if the first item is to
be considered less than, equal to, or greater than the second,
respectively.

<br><br>
<dt><strong><strong>-decreasing</strong></strong><dd>
Sort the items in decreasing order (&quot;largest&quot; items first).

<br><br>
<dt><strong><strong>-dictionary</strong></strong><dd>
Use dictionary-style comparison. This is the same as <strong>-ascii</strong>
except (a) case is ignored except as a tie-breaker and (b) if two
strings contain embedded numbers, the numbers compare as integers,
not characters.  For example, in <strong>-dictionary</strong> mode, <em>bigBoy</em>
sorts between <em>bigbang</em> and <em>bigboy</em>, and <em>x10y</em>
sorts between <em>x9y</em> and <em>x11y</em>.

<br><br>
<dt><strong><strong>-increasing</strong></strong><dd>
Sort the items in increasing order (&quot;smallest&quot; items first). This is the default.

<br><br>
<dt><strong><strong>-integer</strong></strong><dd>
Convert to integers and use integer comparison.

<br><br>
<dt><strong><strong>-real</strong></strong><dd>
Convert to floating-point values and use floating comparison.
</dl>

<dt><a name="94"><i class='arg'>pathName</i> <b class='cmd'>item span</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>numColumns</i>? ?<i class='arg'>column numColumns ...</i>?</a><dd>

This command sets or retrieves the number of columns that a style covers.
If no <i class='arg'>column</i> is specified, the return value is a list of spans, one per column.
If no <i class='arg'>numColumns</i> is specified, the return value is the span for <i class='arg'>column</i>.
<br><br>
If one or more <i class='arg'>column</i>-<i class='arg'>numColumns</i> pairs is specified, the
span for each <i class='arg'>column</i> is set to <i class='arg'>numColumns</i>. In this case <i class='arg'>itemDesc</i>
may refer to multiple items and each <i class='arg'>column</i> may refer to multiple
columns.

<br><br>
<dt><a name="95"><i class='arg'>pathName</i> <b class='cmd'>item state</b> <i class='arg'>command</i> <i class='arg'>itemDesc</i> ?<i class='arg'>arg ...</i>?</a><dd>

This command is used to manipulate the states of an item.
The exact behavior of the command depends on the <i class='arg'>command</i> argument
that follows the <b class='cmd'>style</b> argument.
The following forms of the command are supported:

<br><br>
<dl>

<dt><a name="96"><i class='arg'>pathName</i> <b class='cmd'>item state forcolumn</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> ?<i class='arg'>stateDescList</i>?</a><dd>

Just like <b class='cmd'>item state set</b> but manipulates dynamic states for a single
item column, not the item as a whole. If <i class='arg'>stateDescList</i> is unspecified,
this command returns a list containing the names of all the dynamic states
which are switched on in <i class='arg'>column</i>.
<br><br>
If <i class='arg'>stateDescList</i> is specified, then <i class='arg'>itemDesc</i> may refer to multiple
items and <i class='arg'>column</i> may refer to multiple columns.

<br><br>
<dt><a name="97"><i class='arg'>pathName</i> <b class='cmd'>item state get</b> <i class='arg'>itemDesc</i> ?<i class='arg'>stateName</i>?</a><dd>

If no <i class='arg'>stateName</i> is specified, returns a list containing
the names of all (static and dynamic) states
which are currently switched on for the item described by <i class='arg'>itemDesc</i>.
If a <i class='arg'>stateName</i> is specified,
1 is returned if the specified state is currently switched on for the item,
0 otherwise.

<br><br>
<dt><a name="98"><i class='arg'>pathName</i> <b class='cmd'>item state set</b> <i class='arg'>itemDesc</i> ?<i class='arg'>lastItem</i>? <i class='arg'>stateDescList</i></a><dd>

Every element of <i class='arg'>stateDescList</i>
must be the name of a dynamic state (see <a href="#states">STATES</a> below),
optionally preceded by a <strong>~</strong> or <strong>!</strong> character.
Every state with a leading <strong>!</strong> will be switched off for the
item described by <i class='arg'>itemDesc</i>,
every state with a leading <strong>~</strong> will be toggled, and
every state without leading <strong>!</strong> or <strong>~</strong> will be switched on.
If <i class='arg'>lastItem</i> is specified, the state changes will be made for all items
in the range between <i class='arg'>itemDesc</i> and <i class='arg'>lastItem</i>.
If <i class='arg'>lastItem</i> unspecified,
then the state changes are made for all items described by <i class='arg'>itemDesc</i>.

</dl>

<dt><a name="99"><i class='arg'>pathName</i> <b class='cmd'>item style</b> <i class='arg'>command</i> <i class='arg'>itemDesc</i> ?<i class='arg'>arg ...</i>?</a><dd>

This command is used to manipulate the styles of an item.
The exact behavior of the command depends on the <i class='arg'>command</i> argument
that follows the <b class='cmd'>style</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="100"><i class='arg'>pathName</i> <b class='cmd'>item style elements</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i></a><dd>

This command returns a list containing the names of elements which were
configured by the <b class='cmd'>item element configure</b> command for the item
described by <i class='arg'>itemDesc</i> in <i class='arg'>column</i>. If there is no style assigned
to <i class='arg'>column</i> an error is returned.

<br><br>
<dt><a name="101"><i class='arg'>pathName</i> <b class='cmd'>item style map</b> <i class='arg'>itemDesc</i> <i class='arg'>column</i> <i class='arg'>style</i> <i class='arg'>map</i></a><dd>

Like the <b class='cmd'>item style set</b> command, this command may be used to assign a
style to a specific column of an item. Unlike <b class='cmd'>item style set</b>, this
command can transfer configuration values of elements in the current style
to elements in the new style specified by <i class='arg'>style</i>.

<i class='arg'>Map</i> must be a list of <i class='arg'>elementOld</i>-<i class='arg'>elementNew</i> pairs, where
<i class='arg'>elementOld</i> is an element in the current style, and <i class='arg'>elementNew</i> is
an element in the style specified by <i class='arg'>style</i>. Both <i class='arg'>elementOld</i> and
<i class='arg'>elementNew</i> must be of the same type (<strong>bitmap</strong>, <strong>text</strong> etc).
<i class='arg'>ItemDesc</i> may refer to multiple items and <i class='arg'>column</i> may refer to
multiple columns.

<br><br>
<dt><a name="102"><i class='arg'>pathName</i> <b class='cmd'>item style set</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>style</i>? ?<i class='arg'>column style ...</i>?</a><dd>

This command sets or retrieves the style assigned to one or more columns.

If no <i class='arg'>column</i> is specified, this command returns a list containing the names of the
styles set for all columns of the item described by <i class='arg'>itemDesc</i>.

If no <i class='arg'>style</i> is specified, this command
returns the name of the style set for the item described by
<i class='arg'>itemDesc</i> in <i class='arg'>column</i>.
<br><br>
If one or more <i class='arg'>column</i>-<i class='arg'>style</i> pairs is specified,
then the style in each <i class='arg'>column</i> is set to <i class='arg'>style</i>. In this case
<i class='arg'>itemDesc</i> may refer to multiple items and each <i class='arg'>column</i> may refer to
multiple columns.
</dl>


<dt><a name="103"><i class='arg'>pathName</i> <b class='cmd'>item tag</b> <i class='arg'>option</i> ?<i class='arg'>arg arg ...</i>?</a><dd>

This command is used to manipulate tags on items.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>item tag</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="104"><i class='arg'>pathName</i> <b class='cmd'>item tag add</b> <i class='arg'>itemDesc</i> <i class='arg'>tagList</i></a><dd>

Adds each tag in <i class='arg'>tagList</i> to the items specified by the
<a href="#item_description">item description</a> <i class='arg'>itemDesc</i>.
Duplicate tags are ignored. The list of tags for an item can also be
changed via an item's <strong>-tags</strong> option.

<br><br>
<dt><a name="105"><i class='arg'>pathName</i> <b class='cmd'>item tag expr</b> <i class='arg'>itemDesc</i> <i class='arg'>tagExpr</i></a><dd>

Evaluates the tag expression <i class='arg'>tagExpr</i> against every item
specified by the <a href="#item_description">item description</a>
<i class='arg'>itemDesc</i>. The result is 1 if the tag expression evaluates to true
for every item, 0 otherwise.

<br><br>
<dt><a name="106"><i class='arg'>pathName</i> <b class='cmd'>item tag names</b> <i class='arg'>itemDesc</i></a><dd>

Returns a list of tag names assigned to the items
specified by the <a href="#item_description">item description</a>
<i class='arg'>itemDesc</i>. The result is the union of any tags assigned to the
items.

<br><br>
<dt><a name="107"><i class='arg'>pathName</i> <b class='cmd'>item tag remove</b> <i class='arg'>itemDesc</i> <i class='arg'>tagList</i></a><dd>

Removes each tag in <i class='arg'>tagList</i> from the items specified by the
<a href="#item_description">item description</a> <i class='arg'>itemDesc</i>.
It is not an error if any of the items do not use any of the tags.
The list of tags for an item can also be changed via an item's
<strong>-tags</strong> option.
</dl>


<dt><a name="108"><i class='arg'>pathName</i> <b class='cmd'>item text</b> <i class='arg'>itemDesc</i> ?<i class='arg'>column</i>? ?<i class='arg'>text</i>? ?<i class='arg'>column text ...</i>?</a><dd>

This command sets or retrieves the value of the -text option for the first
text element in one or more columns.

If no <i class='arg'>column</i> is specified, this command returns a list of values,
one per column.

If no <i class='arg'>text</i> is specified, this command returns the value for <i class='arg'>column</i>.
<br><br>
If one or more <i class='arg'>column</i>-<i class='arg'>text</i> pairs is specified,
then the value of the -text option in each <i class='arg'>column</i> is set to <i class='arg'>text</i>.
In this case <i class='arg'>itemDesc</i> may refer to multiple items and each <i class='arg'>column</i>
may refer to multiple columns.
<br><br>
Note that this command is provided as a convenience. Use the
<b class='cmd'>item element configure</b> or <b class='cmd'>item element cget</b> commands if you
want to set or retrieve the value of the -text option for a specific text element.

<br><br>
<dt><a name="109"><i class='arg'>pathName</i> <b class='cmd'>item toggle</b> <i class='arg'>itemDesc</i> ?<strong>-recurse</strong>?</a><dd>

Changes the <strong>open</strong> state of the item(s) described by <i class='arg'>itemDesc</i>.
If the <strong>open</strong> state is currently switched off, then
this command does the same as the <b class='cmd'>item expand</b> widget command;
otherwise the same as the <b class='cmd'>item collapse</b> widget command.
If <strong>-recurse</strong> is specified, then the <strong>open</strong> state of all descendants of
the items described by <i class='arg'>itemDesc</i> will also be toggled.

</dl>

<dt><a name="110"><i class='arg'>pathName</i> <b class='cmd'>marquee</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a><dd>

This command is used to manipulate the marquee,
a rectangular region of the treectrl widget
optionally marked with a surrounding dotted line.
One corner point of the marquee is fixed as long as the marquee is visible
and called the anchor; the diagonally opposite corner is dragged with the
mouse while resizing the marquee and simply called the corner.
All coordinates handled by this widget command are treectrl coordinates,
i.e. the <b class='cmd'>canvasx</b> or <b class='cmd'>canvasy</b> widget command should be
used before any window coordinates can be used.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>marquee</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="111"><i class='arg'>pathName</i> <b class='cmd'>marquee anchor</b> ?<i class='arg'>x y</i>?</a><dd>

Returns a list containing the x and y coordinates of the anchor,
if no additional arguments are specified.
If two coordinates are specified,
sets the anchor to the given coordinates <i class='arg'>x</i> and <i class='arg'>y</i>.

<br><br>
<dt><a name="112"><i class='arg'>pathName</i> <b class='cmd'>marquee cget</b> <i class='arg'>option</i></a><dd>

This command returns the current value of the marquee option
named <i class='arg'>option</i>.
<i class='arg'>Option</i> may have any of the values accepted by the
<b class='cmd'>marquee configure</b> widget command.

<br><br>
<dt><a name="113"><i class='arg'>pathName</i> <b class='cmd'>marquee configure</b> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command is similar to the <b class='cmd'>configure</b> widget command except
that it modifies the marquee options
instead of modifying options for the overall treectrl widget.
If no <i class='arg'>option</i> is specified, the command returns a list describing
all of the available marquee options (see <strong>Tk_ConfigureInfo</strong>
for information on the format of this list).
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
a list describing the one named marquee option (this list will be identical to
the corresponding sublist of the value returned if no <i class='arg'>option</i>
is specified).
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given marquee option(s) to have the given value(s);
in this case the command returns an empty string.
<br><br>

The following marquee options are supported:

<br><br>
<dl>
<dt><strong><strong>-visible</strong></strong> <i class='arg'>boolean</i><dd>
Specifies a boolean value which determines
whether the dotted line surrounding the region of the marquee
should currently be visible.
</dl>

<dt><a name="114"><i class='arg'>pathName</i> <b class='cmd'>marquee coords</b> ?<i class='arg'>x1 y1 x2 y2</i>?</a><dd>

Returns a list containing the x and y coordinates of the anchor
followed by the x and y coordinates of the corner,
if no additional arguments are specified.
If four coordinates are specified,
sets the anchor to the given coordinates <i class='arg'>x1</i> and <i class='arg'>y1</i>
and the corner to the coordinates <i class='arg'>x2</i> and <i class='arg'>y2</i>.

<br><br>
<dt><a name="115"><i class='arg'>pathName</i> <b class='cmd'>marquee corner</b> ?<i class='arg'>x y</i>?</a><dd>

Returns a list containing the x and y coordinates of the corner,
if no additional arguments are specified.
If two coordinates are specified,
sets the corner to the given coordinates <i class='arg'>x</i> and <i class='arg'>y</i>.

<br><br>
<dt><a name="116"><i class='arg'>pathName</i> <b class='cmd'>marquee identify</b></a><dd>

Returns a list with information about any items intersecting the marquee.
The format of the returned list is:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
{
    {item {column element element ...} {column element element ...} ...}
    {item {column element element ...} {column element element ...} ...}
    ...
}
</pre></td></tr></table></p>
There may be zero sublists following an item id if the marquee is in the
button/line area of an item. There may be zero element names following a
column id if the item-column has no style or if the marquee does not
intersect any elements in that column.

</dl>

<dt><a name="117"><i class='arg'>pathName</i> <b class='cmd'>notify</b> <i class='arg'>option</i> ?<i class='arg'>arg ...</i>?</a><dd>

Many Tk widgets communicate with the outside world via <strong>-command</strong>
callbacks and/or virtual events. For example, the Text widget
evaluates its <strong>-yscrollcommand</strong> when the view in the widget changes,
and generates a &lt;&lt;Modified&gt;&gt; virtual event when text is inserted or deleted.
A treectrl widget replaces both methods of communication with its own event
mechanism accessed through the <b class='cmd'>notify</b> subcommands.
<br><br>

The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>notify</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="118"><i class='arg'>pathName</i> <b class='cmd'>notify bind</b> ?<i class='arg'>object</i>? ?<i class='arg'>pattern</i>? ?+??<i class='arg'>script</i>?</a><dd>

This command associates Tcl scripts with events generated by a
treectrl widget.

If all three arguments are specified, <b class='cmd'>notify bind</b> will arrange for
<i class='arg'>script</i> (a Tcl script) to be evaluated whenever the event(s) specified
by <i class='arg'>pattern</i> are generated by this treectrl widget.

If <i class='arg'>script</i> is prefixed with a &quot;+&quot;, then it is appended to any existing
binding for <i class='arg'>pattern</i>;  otherwise <i class='arg'>script</i> replaces any existing binding.

If <i class='arg'>script</i> is an empty string then the current binding for <i class='arg'>pattern</i>
is destroyed, leaving <i class='arg'>pattern</i> unbound. In all of the cases where a script
argument is provided, <b class='cmd'>notify bind</b> returns an empty string.
<br><br>
If <i class='arg'>pattern</i> is specified without a <i class='arg'>script</i>, then the script currently
bound to <i class='arg'>pattern</i> is returned, or an empty string is returned if there is
no binding for <i class='arg'>pattern</i>. If neither <i class='arg'>pattern</i> nor <i class='arg'>script</i> is
specified, then the return value is a list whose elements are all the patterns
for which there exist bindings for <i class='arg'>object</i>. 
<br><br>
The <i class='arg'>object</i> argument determines which window(s) the binding applies to.
If <i class='arg'>object</i> begins with a dot, as in .a.b.c, then it must be the path name
for a window; otherwise it may be an arbitrary string. Like the regular
<b class='cmd'>bind</b> command, bindings on window names are automatically removed if
that window is destroyed.

<br><br>
<dt><a name="119"><i class='arg'>pathName</i> <b class='cmd'>notify configure</b> <i class='arg'>object</i> <i class='arg'>pattern</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command sets and retrieves options for bindings created by the
<b class='cmd'>notify bind</b> command.
<br><br>
If no <i class='arg'>option</i> is specified, the command returns a list with
<i class='arg'>option</i>-<i class='arg'>value</i> pairs describing all
the available binding options for <i class='arg'>pattern</i> on <i class='arg'>object</i>.
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>,
then the command returns the current value of that option.
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given option(s) to have the given value(s) for the binding;
in this case the command returns an empty string.
<br><br>

The following binding options are supported:
<br><br>
<dl>
<dt><strong><strong>-active</strong></strong> <i class='arg'>boolean</i><dd>
Specifies if the binding should be active.
As long as this option is specified as false,
a binding script will not be evaluated when the corresponding event is
generated.
</dl>

<dt><a name="120"><i class='arg'>pathName</i> <b class='cmd'>notify detailnames</b> <i class='arg'>eventName</i></a><dd>

Returns a list containing the names of all details,
which are installed for the event with the name <i class='arg'>eventName</i>
by means of the <b class='cmd'>notify install</b> widget command
or by the treectrl widget itself.

<br><br>
<dt><a name="121"><i class='arg'>pathName</i> <b class='cmd'>notify eventnames</b></a><dd>

Returns a list containing the names of all events,
which are installed by means of the <b class='cmd'>notify install</b> widget command
or by the treectrl widget itself.

<br><br>
<dt><a name="122"><i class='arg'>pathName</i> <b class='cmd'>notify generate</b> <i class='arg'>pattern</i> ?<i class='arg'>charMap</i>? ?<i class='arg'>percentsCommand</i>?</a><dd>

This command causes the treectrl widget to generate an event. This command is
typically used to generate dynamic events created by the <b class='cmd'>notify install</b>
command, but may be used to generate static events also.
The event specified by <i class='arg'>pattern</i> is generated, and any active binding
scripts on the event are evaluated after undergoing %-substitution.
If there are details defined for the event,
<i class='arg'>pattern</i> must describe an &lt;<i class='arg'>eventName</i>-<i class='arg'>detail</i>&gt; pair,
otherwise <i class='arg'>pattern</i> should be &lt;<i class='arg'>eventName</i>&gt;.
<br><br>

The optional <i class='arg'>charMap</i> is a list of <i class='arg'>char</i>-<i class='arg'>value</i> pairs
as in the form returned by <b class='cmd'>array get</b>.
Each <i class='arg'>char</i> has to be exactly one character.
The <i class='arg'>charMap</i> is used in %-substitution.
<br><br>

If <i class='arg'>percentsCommand</i> is specified, then it will be used to perform %-substitution
on any scripts bound to the event. If <i class='arg'>percentsCommand</i> is not specified and
the event is dynamic, then the %-subtitution command passed to <b class='cmd'>notify install</b>
will be used if it was provided. If the event is static or no %-substitution
command is available, then all %-substitution is done using <i class='arg'>charMap</i> only .
See <b class='cmd'>notify install</b> for a description of <i class='arg'>percentsCommand</i>.

<br><br>
<dt><a name="123"><i class='arg'>pathName</i> <b class='cmd'>notify install</b> <i class='arg'>pattern</i> ?<i class='arg'>percentsCommand</i>?</a><dd>

This command installs a new event or detail specified by <i class='arg'>pattern</i>. 
Events created by this command are called dynamic,
whereas events created by the treectrl widget itself are called static.
This command may be called to set or retrieve the <i class='arg'>percentsCommand</i> for
an existing dynamic event.
<br><br>

The optional <i class='arg'>percentsCommand</i> is a list containing the name of a Tcl
command, plus any optional arguments, to which five additional arguments
will be appended. The command will be called to perform %-substitution on any
scripts bound to the event specified by <i class='arg'>pattern</i> (see <a href="#events_and_script_substitutions">EVENTS AND SCRIPT SUBSTITUTIONS</a>).
<i class='arg'>PercentsCommand</i> should be defined as follows:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
proc percentsCommand {?arg arg ...? char object event detail charMap} {
	switch -- $char {
		...
	}
	return $value
}
</pre></td></tr></table></p>

The optional <i class='arg'>arg</i> arguments are part of the <i class='arg'>percentsCommand</i> list.
<i class='arg'>Char</i> is the %-character to be substituted. <i class='arg'>Object</i> is the same
as the argument to <b class='cmd'>notify bind</b>. <i class='arg'>Event</i> and <i class='arg'>detail</i> specify
the event. <i class='arg'>CharMap</i> is the same as the argument to <b class='cmd'>notify generate</b>.
<i class='arg'>PercentsCommand</i> should return the value to replace the %-character by.
If an error occurs evaluating <i class='arg'>percentsCommand</i>, the %-character is replaced
by itself.
<br><br>
<b class='cmd'>notify install</b> returns the current <i class='arg'>percentsCommand</i> for the event,
or an error if the event is not dynamic.

<br><br>
<dt><a name="124"><i class='arg'>pathName</i> <b class='cmd'>notify install detail</b> <i class='arg'>eventName</i> <i class='arg'>detail</i> ?<i class='arg'>percentsCommand</i>?</a><dd>

Deprecated.
Use <b class='cmd'>notify install</b> with a <i class='arg'>pattern</i> of &lt;<i class='arg'>eventName</i>-<i class='arg'>detail</i>&gt; instead.

<br><br>
<dt><a name="125"><i class='arg'>pathName</i> <b class='cmd'>notify install event</b> <i class='arg'>eventName</i> ?<i class='arg'>percentsCommand</i>?</a><dd>

Deprecated.
Use <b class='cmd'>notify install</b> with a <i class='arg'>pattern</i> of &lt;<i class='arg'>eventName</i>&gt; instead.

<br><br>
<dt><a name="126"><i class='arg'>pathName</i> <b class='cmd'>notify linkage</b> <i class='arg'>pattern</i></a><dd>

Returns a string indicating
whether the specified event or detail is created
by means of the <b class='cmd'>notify install</b> widget command (<strong>dynamic</strong>)
or by the treectrl widget itself (<strong>static</strong>).

<br><br>
<dt><a name="127"><i class='arg'>pathName</i> <b class='cmd'>notify linkage</b> <i class='arg'>eventName</i> ?<i class='arg'>detail</i>?</a><dd>

Deprecated.
Use <b class='cmd'>notify linkage</b> with a <i class='arg'>pattern</i> of &lt;<i class='arg'>eventName</i>&gt; or
&lt;<i class='arg'>eventName</i>-<i class='arg'>detail</i>&gt; instead.

<br><br>
<dt><a name="128"><i class='arg'>pathName</i> <b class='cmd'>notify unbind</b> <i class='arg'>object</i> ?<i class='arg'>pattern</i>?</a><dd>

If no <i class='arg'>pattern</i> is specified, all bindings on <i class='arg'>object</i> are removed.
If <i class='arg'>pattern</i> is specified, then the current binding for <i class='arg'>pattern</i>
is destroyed, leaving <i class='arg'>pattern</i> unbound.

<br><br>
<dt><a name="129"><i class='arg'>pathName</i> <b class='cmd'>notify uninstall</b> <i class='arg'>pattern</i></a><dd>

If the event or detail specified by <i class='arg'>pattern</i> is static
(i.e. created by the treectrl widget itself), an error is generated.
Otherwise the dynamic event or detail is removed. If an event name is specified
without a detail, all details for that event are also removed.

<br><br>
<dt><a name="130"><i class='arg'>pathName</i> <b class='cmd'>notify uninstall detail</b> <i class='arg'>eventName</i> <i class='arg'>detail</i></a><dd>

Deprecated.
Use <b class='cmd'>notify uninstall</b> with a <i class='arg'>pattern</i> of &lt;<i class='arg'>eventName</i>-<i class='arg'>detail</i>&gt; instead.

<br><br>
<dt><a name="131"><i class='arg'>pathName</i> <b class='cmd'>notify uninstall event</b> <i class='arg'>eventName</i></a><dd>

Deprecated.
Use <b class='cmd'>notify uninstall</b> with a <i class='arg'>pattern</i> of &lt;<i class='arg'>eventName</i>&gt; instead.
</dl>

<dt><a name="132"><i class='arg'>pathName</i> <b class='cmd'>numcolumns</b></a><dd>

Deprecated. Use the <b class='cmd'>column count</b> command instead.

<br><br>
<dt><a name="133"><i class='arg'>pathName</i> <b class='cmd'>numitems</b></a><dd>

Deprecated. Use the <b class='cmd'>item count</b> command instead.

<br><br>
<dt><a name="134"><i class='arg'>pathName</i> <b class='cmd'>orphans</b></a><dd>

Returns a list containing the item ids of all items
which have no parent.
When an item is created, it has no parent by default,
and can later become an orphan
by means of the <b class='cmd'>item remove</b> widget command. The root item is not returned.

<br><br>
<dt><a name="135"><i class='arg'>pathName</i> <b class='cmd'>range</b> <i class='arg'>first</i> <i class='arg'>last</i></a><dd>

Deprecated. Use the <b class='cmd'>item range</b> command instead.

<br><br>
<dt><a name="136"><i class='arg'>pathName</i> <b class='cmd'>scan</b> <i class='arg'>option</i> <i class='arg'>args</i></a><dd>

This command is used to implement scanning on treectrls. It has two forms,
depending on <i class='arg'>option</i>: 
<br><br>
<dl>

<dt><a name="137"><i class='arg'>pathName</i> <b class='cmd'>scan mark</b> <i class='arg'>x</i> <i class='arg'>y</i></a><dd>

Records <i class='arg'>x</i> and <i class='arg'>y</i> and the treectrl's current view;  used in conjunction with
later <b class='cmd'>scan dragto</b> commands. Typically this command is associated with a
mouse button press in the widget and <i class='arg'>x</i> and <i class='arg'>y</i> are the coordinates of the
mouse. It returns an empty string. 

<br><br>
<dt><a name="138"><i class='arg'>pathName</i> <b class='cmd'>scan dragto</b> <i class='arg'>x</i> <i class='arg'>y</i> ?<i class='arg'>gain</i>?</a><dd>

This command computes the difference between its <i class='arg'>x</i> and <i class='arg'>y</i> arguments (which
are typically mouse coordinates) and the <i class='arg'>x</i> and <i class='arg'>y</i> arguments to the last
<b class='cmd'>scan mark</b> command for the widget. It then adjusts the view by <i class='arg'>gain</i>
times the difference in coordinates, where <i class='arg'>gain</i> defaults to 10. This
command is typically associated with mouse motion events in the widget,
to produce the effect of dragging the treectrl at high speed through its window.
The return value is an empty string.
</dl>

<dt><a name="139"><i class='arg'>pathName</i> <b class='cmd'>state</b> <i class='arg'>option</i> <i class='arg'>args</i></a><dd>

This command is used to manipulate the list of user-defined states,
see section <a href="#states">STATES</a> below.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>state</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="140"><i class='arg'>pathName</i> <b class='cmd'>state define</b> <i class='arg'>stateName</i></a><dd>

Defines a new state with the name <i class='arg'>stateName</i>,
which must not be the name of an existing state.

<br><br>
<dt><a name="141"><i class='arg'>pathName</i> <b class='cmd'>state linkage</b> <i class='arg'>stateName</i></a><dd>

Returns a string indicating
whether the specified state is user-defined
by means of the <b class='cmd'>state define</b> widget command (<strong>dynamic</strong>)
or predefined by the treectrl widget itself (<strong>static</strong>).

<br><br>
<dt><a name="142"><i class='arg'>pathName</i> <b class='cmd'>state names</b></a><dd>

Returns a list containing the names of all user-defined states.

<br><br>
<dt><a name="143"><i class='arg'>pathName</i> <b class='cmd'>state undefine</b> ?<i class='arg'>stateName ...</i>?</a><dd>

Every <i class='arg'>stateName</i> must be the name of a user-defined state.
Removes this state from the list of user-defined states.
</dl>

<dt><a name="144"><i class='arg'>pathName</i> <b class='cmd'>see</b> <i class='arg'>itemDesc</i></a><dd>

Adjust the view in the treectrl so that the item
described by <i class='arg'>itemDesc</i> is visible.
If the item is already visible then the command has no effect;
otherwise the treectrl scrolls to bring the item into view,
and the corresponding <strong>&lt;Scroll-x&gt;</strong> and/or <strong>&lt;Scroll-y&gt;</strong>
events are generated.

<br><br>
<dt><a name="145"><i class='arg'>pathName</i> <b class='cmd'>selection</b> <i class='arg'>option</i> <i class='arg'>args</i></a><dd>

This command is used to adjust the selection within a treectrl.
It has several forms, depending on <i class='arg'>option</i>:

<br><br>
<dl>
<dt><a name="146"><i class='arg'>pathName</i> <b class='cmd'>selection add</b> <i class='arg'>first</i> ?<i class='arg'>last</i>?</a><dd>

<i class='arg'>First</i> and <i class='arg'>last</i> (if specified)
must be valid <a href="#item_description">item descriptions</a>. If both
<i class='arg'>first</i> and <i class='arg'>last</i> are specified, then they may refer to a single
item only; in this case
the command adds every unselected item in the range between
<i class='arg'>first</i> and <i class='arg'>last</i>, inclusive, to the selection
without affecting the selected state of items outside that range.
If only <i class='arg'>first</i> is specified, then
every unselected item specified by <i class='arg'>first</i> is added to the selection.
A <strong>&lt;Selection&gt;</strong> event is generated if any items were added to the
selection.

<br><br>
<dt><a name="147"><i class='arg'>pathName</i> <b class='cmd'>selection anchor</b> ?<i class='arg'>itemDesc</i>?</a><dd>

If <i class='arg'>itemDesc</i> is specified,
the selection anchor is set to the described item.
The selection anchor is the end of the selection that is fixed
while dragging out a selection with the mouse.
The item description <strong>anchor</strong> may be used to refer to the anchor item.
This command doesn't modify the selection state of any item.
Returns the unique id of the selection anchor item.

<br><br>
<dt><a name="148"><i class='arg'>pathName</i> <b class='cmd'>selection clear</b> ?<i class='arg'>first</i>? ?<i class='arg'>last</i>?</a><dd>

<i class='arg'>First</i> and <i class='arg'>last</i> (if specified)
must be valid <a href="#item_description">item descriptions</a>. If both
<i class='arg'>first</i> and <i class='arg'>last</i> are specified, then they may refer to a single
item only; in this case any selected items between <i class='arg'>first</i> and <i class='arg'>last</i>
(inclusive) are removed from the selection without affecting
the selected state of items outside that range.
If only <i class='arg'>first</i> is specified, then
every selected item specified by <i class='arg'>first</i> is removed from the selection.
If neither <i class='arg'>first</i> nor <i class='arg'>last</i> are specified,
then all selected items are removed from the selection.
A <strong>&lt;Selection&gt;</strong> event is generated if any items were removed from the
selection.

<br><br>
<dt><a name="149"><i class='arg'>pathName</i> <b class='cmd'>selection count</b></a><dd>

Returns an integer indicating the number
of items in the treectrl that are currently selected.

<br><br>
<dt><a name="150"><i class='arg'>pathName</i> <b class='cmd'>selection get</b> ?<i class='arg'>first</i>? ?<i class='arg'>last</i>?</a><dd>

When no additional arguments are given, the result is an unsorted list
containing the item ids of all of the items in the treectrl that are currently selected.
If there are no items selected in the treectrl, then an empty string is returned.
The optional arguments <i class='arg'>first</i> and <i class='arg'>last</i> are treated as indices into
the sorted list of selected items; these arguments allow in-place <b class='cmd'>lindex</b>
and <b class='cmd'>lrange</b> operations on the selection. For example:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
.t selection get 0       ; # return the first selected item
.t selection get end     ; # return the last selected item
.t selection get 1 end-1 ; # return every selected item except the first and last
</pre></td></tr></table></p>

<br><br>
<dt><a name="151"><i class='arg'>pathName</i> <b class='cmd'>selection includes</b> <i class='arg'>itemDesc</i></a><dd>

Returns 1 if the item described by <i class='arg'>itemDesc</i> is currently
selected, 0 if it isn't.

<br><br>
<dt><a name="152"><i class='arg'>pathName</i> <b class='cmd'>selection modify</b> <i class='arg'>select</i> <i class='arg'>deselect</i></a><dd>

Both arguments <i class='arg'>select</i> and <i class='arg'>deselect</i> are
a possibly-empty list of <a href="#item_description">item descriptions</a>.
Any unselected items in <i class='arg'>select</i> are added to the selection,
and any selected items in <i class='arg'>deselect</i> are removed from the selection (except
for those items which are also in <i class='arg'>select</i>).
A <strong>&lt;Selection&gt;</strong> event is generated if any items were selected or deselected.
</dl>

<dt><a name="153"><i class='arg'>pathName</i> <b class='cmd'>style</b> <i class='arg'>option</i> ?<i class='arg'>element</i>? ?<i class='arg'>arg arg ...</i>?</a><dd>

This command is used to manipulate styles, which can be thought of
as a geometry manager for elements.
The exact behavior of the command depends on the <i class='arg'>option</i> argument
that follows the <b class='cmd'>style</b> argument.
The following forms of the command are supported:

<br><br>
<dl>
<dt><a name="154"><i class='arg'>pathName</i> <b class='cmd'>style cget</b> <i class='arg'>style</i> <i class='arg'>option</i></a><dd>

This command returns the current value of the option named <i class='arg'>option</i>
associated with the style given by <i class='arg'>style</i>.
<i class='arg'>Option</i> may have any of the values accepted by the
<b class='cmd'>style configure</b> widget command.

<br><br>
<dt><a name="155"><i class='arg'>pathName</i> <b class='cmd'>style configure</b> <i class='arg'>style</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command is similar to the <b class='cmd'>configure</b> widget command except
that it modifies options associated with the style given by <i class='arg'>style</i>
instead of modifying options for the overall treectrl widget.
If no <i class='arg'>option</i> is specified, the command returns a list describing
all of the available options for <i class='arg'>style</i> (see <strong>Tk_ConfigureInfo</strong>
for information on the format of this list).
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
a list describing the one named option (this list will be identical to
the corresponding sublist of the value returned if no <i class='arg'>option</i>
is specified).
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given option(s) to have the given value(s) in <i class='arg'>style</i>;
in this case the command returns an empty string.
<br><br>

The options of a style have effect on all elements managed by the style.
The following options are supported:

<br><br>
<dl>
<dt><strong><strong>-orient</strong></strong> <i class='arg'>varName</i><dd>
This option specifies which orientation should be used
when laying out the elements associated with this style.
Must be either <strong>horizontal</strong> (the default)
or <strong>vertical</strong> or an abbreviation of one of these.
</dl>

<dt><a name="156"><i class='arg'>pathName</i> <b class='cmd'>style create</b> <i class='arg'>style</i> ?<i class='arg'>option value ...</i>?</a><dd>

Create a new style in <i class='arg'>pathName</i> with name <i class='arg'>style</i>.
After <i class='arg'>style</i> there may be any number of <i class='arg'>option</i>-<i class='arg'>value</i>
pairs, each of which sets one of the configuration options
for the style.  These same <i class='arg'>option</i>-<i class='arg'>value</i> pairs may be
used in <b class='cmd'>style configure</b> widget commands to change the style's
configuration.
Returns the name of the new style.

<br><br>
<dt><a name="157"><i class='arg'>pathName</i> <b class='cmd'>style delete</b> ?<i class='arg'>style ...</i>?</a><dd>

Deletes each of the named styles and returns an empty string.
If a style is deleted while it is still used to display
one or more items,
it is also removed from the style list of these items.

<br><br>
<dt><a name="158"><i class='arg'>pathName</i> <b class='cmd'>style elements</b> <i class='arg'>style</i> ?<i class='arg'>elementList</i>?</a><dd>

Specifies the elements which should be layed out by this style.
Each element of <i class='arg'>elementList</i> must be the name of an element
created by the widget command <b class='cmd'>element create</b>.
Duplicate names in <i class='arg'>elementList</i> are ignored.
An element which was specified in a former call of this command
for <i class='arg'>style</i> but is not included in <i class='arg'>elementList</i>,
will be deleted from the elements layed out by <i class='arg'>style</i>.
<br><br>

If the <i class='arg'>elementList</i> argument is not specified, a list is returned
containing the currently defined elements of <i class='arg'>style</i>.

<br><br>
<dt><a name="159"><i class='arg'>pathName</i> <b class='cmd'>style layout</b> <i class='arg'>style</i> <i class='arg'>element</i> ?<i class='arg'>option</i>? ?<i class='arg'>value</i>? ?<i class='arg'>option value ...</i>?</a><dd>

This command is similar to the <b class='cmd'>configure</b> widget command except
that it modifies options used by <i class='arg'>style</i> for laying out <i class='arg'>element</i>
instead of modifying options for the overall treectrl widget.
If no <i class='arg'>option</i> is specified, the command returns a list with
<i class='arg'>option</i>-<i class='arg'>value</i> pairs describing
all of the available options for the layout.
If <i class='arg'>option</i> is specified with no <i class='arg'>value</i>, then the command returns
the value of the named option.
If one or more <i class='arg'>option</i>-<i class='arg'>value</i> pairs are specified, then the command
modifies the given option(s) to have the given value(s) for the layout;
in this case the command returns an empty string.
<br><br>

The options of a layout have effect on exactly the one element <i class='arg'>element</i>
managed by <i class='arg'>style</i>.
The following options are supported:

<br><br>
<dl>
<dt><strong><strong>-detach</strong></strong> <i class='arg'>boolean</i><dd>
Specifies whether the element should be positioned by itself,
i.e. independent from the other elements.

<br><br>
<dt><strong><strong>-draw</strong></strong> <i class='arg'>boolean</i><dd>
This is a <a href="#per-state_options">per-state</a> option that determines whether
an element should be drawn. If the value of the option evaluates to false for a given
item state, then the element is not drawn, although it still consumes space in
the layout.

<br><br>
<dt><strong><strong>-expand</strong></strong> <i class='arg'>flags</i><dd>
This option allows the external padding around the element
to increase when a style has more screen space than it needs.
<i class='arg'>Flags</i> is a string that contains zero or more of the characters
<strong>n</strong>, <strong>s</strong>, <strong>w</strong> or <strong>e</strong>.
Each letter refers to the padding on the top, bottom,
left, or right that should be allowed to increase.
This option is typically used to justify an element.

<br><br>
<dt><strong><strong>-iexpand</strong></strong> <i class='arg'>flags</i><dd>
This option allows the internal padding of the element
and the display area of the element to increase
when a style has more screen space than it needs.
<i class='arg'>Flags</i>  is a string that contains zero or more of the characters
<strong>x</strong>, <strong>y</strong>, <strong>n</strong>, <strong>s</strong>, <strong>w</strong> or <strong>e</strong>.
For <strong>n</strong>, <strong>s</strong>, <strong>w</strong> and <strong>e</strong>, each letter refers to the
padding on the top, bottom, left, or right that should be allowed to increase.
For <strong>x</strong> and <strong>y</strong>, each letter refers to the horizontal and
vertical screen space the element can display itself in (i.e., the space
between the padding). Note that if the
<strong>-union</strong> option is specified for this element, then the <strong>x</strong> and
<strong>y</strong> flags have no effect, since the size of an element with
<strong>-union</strong> layout is determined by the elements it surrounds.

<br><br>
<dt><strong><strong>-indent</strong></strong> <i class='arg'>boolean</i><dd>
Specifies whether the element should be positioned to the right of the
button/line area in the tree column. This option is ignored unless the
<strong>-detach</strong> option is true.

<br><br>
<dt><strong><strong>-ipadx</strong></strong> <i class='arg'>amount</i><dd>
<dt><strong><strong>-ipady</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much internal padding to
leave on the left and right (for <strong>-ipadx</strong>)
or top and bottom (for <strong>-ipady</strong>) side of the element.
<i class='arg'>Amount</i> may be a list
of two values to specify padding for the two sides separately,
it defaults to 0.

<br><br>
<dt><strong><strong>-minheight</strong></strong> <i class='arg'>pixels</i><dd>
<dt><strong><strong>-height</strong></strong> <i class='arg'>pixels</i><dd>
<dt><strong><strong>-maxheight</strong></strong> <i class='arg'>pixels</i><dd>
Specifies the minimum, fixed, and maximum height of the element.

<br><br>
<dt><strong><strong>-minwidth</strong></strong> <i class='arg'>pixels</i><dd>
<dt><strong><strong>-width</strong></strong> <i class='arg'>pixels</i><dd>
<dt><strong><strong>-maxwidth</strong></strong> <i class='arg'>pixels</i><dd>
Specifies the minimum, fixed, and maximum width of the element.

<br><br>
<dt><strong><strong>-padx</strong></strong> <i class='arg'>amount</i><dd>
<dt><strong><strong>-pady</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much external padding to
leave on the left and right (for <strong>-padx</strong>)
or top and bottom (for <strong>-pady</strong>) side of the element.
<i class='arg'>Amount</i> may be a list
of two values to specify padding for the two sides separately,
it defaults to 0.

<br><br>
<dt><strong><strong>-squeeze</strong></strong> <i class='arg'>flags</i><dd>
This option allows the display area of an element to decrease when a
style has less space than it needs.
<i class='arg'>Flags</i> is a string that contains zero or more of the characters
<strong>x</strong> or <strong>y</strong>.
<strong>x</strong> allows display area to decrease horizontally,
<strong>y</strong> allows display area to decrease vertically.
This option is typically used for <strong>text</strong> elements and will cause
the text element to display an ellipsis (...) and/or wrap lines.

<br><br>
<dt><strong><strong>-sticky</strong></strong> <i class='arg'>flags</i><dd>
This option controls how the actual display information (image, text, etc)
of an element is positioned (or stretched) within its display area.
<i class='arg'>Flags</i> is a
string that contains zero or more of the characters <strong>n</strong>, <strong>s</strong>,
<strong>w</strong> or <strong>e</strong>. Each letter refers to the top, bottom, left or right
side of the display area that the display information should &quot;stick&quot; to.

<br><br>
<dt><strong><strong>-union</strong></strong> <i class='arg'>elementList</i><dd>
Specifies a list of other elements which this element will surround.
The size of an element with <strong>-union</strong> layout is determined by the
size and position of the elements in <i class='arg'>elementList</i>.
The <strong>-ipadx</strong> and <strong>-ipady</strong> options in this case refer to the
distance of the edges of the display area of this element from those elements
it surrounds. This option is typically used to display a selection rectangle
around a piece of text. If none of the elements in <i class='arg'>elementList</i> are
visible, then the element is not displayed.

<br><br>
<dt><strong><strong>-visible</strong></strong> <i class='arg'>boolean</i><dd>
This is a <a href="#per-state_options">per-state</a> option that controls visibility
of an element. If the value of the option evaluates to false for a given
item state, then the element is not displayed and consumes no space in the layout.

</dl>

<dt><a name="160"><i class='arg'>pathName</i> <b class='cmd'>style names</b></a><dd>

Returns a list containing the names of all existing styles.
</dl>

<dt><a name="161"><i class='arg'>pathName</i> <b class='cmd'>toggle</b> ?<strong>-recurse</strong>? ?<i class='arg'>itemDesc ...</i>?</a><dd>

Use <b class='cmd'>item toggle</b> instead.

<br><br>
<dt><a name="162"><i class='arg'>pathName</i> <b class='cmd'>xview</b> ?<i class='arg'>args</i>?</a><dd>

This command is used to query and change the horizontal position of the
information displayed in the treectrl's window.
It can take any of the following forms:

<br><br>
<dl>
<dt><a name="163"><i class='arg'>pathName</i> <b class='cmd'>xview</b></a><dd>

Returns a list containing two elements.
Each element is a real fraction between 0 and 1;  together they describe
the horizontal span that is visible in the window.
For example, if the first element is .2 and the second element is .6,
20% of the tree's area
is off-screen to the left, the middle 40% is visible
in the window, and 40% of the tree is off-screen to the right.
These are the same values passed to scrollbars via the <strong>-xscrollcommand</strong>
option.

<br><br>
<dt><a name="164"><i class='arg'>pathName</i> <b class='cmd'>xview moveto</b> <i class='arg'>fraction</i></a><dd>

Adjusts the view in the window so that <i class='arg'>fraction</i> of the
total width of the tree is off-screen to the left.
<i class='arg'>Fraction</i> must be a fraction between 0 and 1.
A <strong>&lt;Scroll-x&gt;</strong> event is generated.

<br><br>
<dt><a name="165"><i class='arg'>pathName</i> <b class='cmd'>xview scroll</b> <i class='arg'>number</i> <i class='arg'>what</i></a><dd>

This command shifts the view in the window left or right according to
<i class='arg'>number</i> and <i class='arg'>what</i>.
<i class='arg'>Number</i> must be an integer.
<i class='arg'>What</i> must be either <strong>units</strong> or <strong>pages</strong> or an abbreviation
of one of these.
If <i class='arg'>what</i> is <strong>units</strong>, the view adjusts left or right in units
determined by the <strong>-xscrollincrement</strong> option (which may be zero,
see the description of that option).
If <i class='arg'>what</i> is <strong>pages</strong> then the view
adjusts in units of nine-tenths the window's width.
If <i class='arg'>number</i> is negative then information farther to the left
becomes visible;  if it is positive then information farther to the right
becomes visible.
A <strong>&lt;Scroll-x&gt;</strong> event is generated.
</dl>

<dt><a name="166"><i class='arg'>pathName</i> <b class='cmd'>yview</b> ?<i class='arg'>args</i>?</a><dd>

This command is used to query and change the vertical position of the
information displayed in the treectrl's window.
It can take any of the following forms:

<br><br>
<dl>
<dt><a name="167"><i class='arg'>pathName</i> <b class='cmd'>yview</b></a><dd>

Returns a list containing two elements.
Each element is a real fraction between 0 and 1;  together they describe
the vertical span that is visible in the window.
For example, if the first element is .6 and the second element is 1.0,
the lowest 40% of the tree's area is visible in the window.
These are the same values passed to scrollbars via the <strong>-yscrollcommand</strong>
option.

<br><br>
<dt><a name="168"><i class='arg'>pathName</i> <b class='cmd'>yview moveto</b> <i class='arg'>fraction</i></a><dd>

Adjusts the view in the window so that <i class='arg'>fraction</i> of the tree's
area is off-screen to the top.
<i class='arg'>Fraction</i> is a fraction between 0 and 1.
A <strong>&lt;Scroll-y&gt;</strong> event is generated.

<br><br>
<dt><a name="169"><i class='arg'>pathName</i> <b class='cmd'>yview scroll</b> <i class='arg'>number</i> <i class='arg'>what</i></a><dd>

This command adjusts the view in the window up or down according to
<i class='arg'>number</i> and <i class='arg'>what</i>.
<i class='arg'>Number</i> must be an integer.
<i class='arg'>What</i> must be either <strong>units</strong> or <strong>pages</strong>.
If <i class='arg'>what</i> is <strong>units</strong>, the view adjusts up or down in units
of the <strong>-yscrollincrement</strong> option (which may be zero,
see the description of that option).
If <i class='arg'>what</i> is <strong>pages</strong> then
the view adjusts in units of nine-tenths the window's height.
If <i class='arg'>number</i> is negative then higher information becomes
visible;  if it is positive then lower information
becomes visible.
A <strong>&lt;Scroll-y&gt;</strong> event is generated.
</dl>
</dl>

<h2><a name="columns">COLUMNS</a></h2>
<p>
A treectrl widget is capable of displaying multiple columns next to each
other.
An item can be considered as a row, which reaches over all columns.

<p>
Columns in a treectrl may be specified in a number of ways.
See <a href="#column_description">COLUMN DESCRIPTION</a> below.

<p>
There is always one special column, the <strong>tail</strong> column, which fills
all space to the right of the last ordinary column.
This column has no number;
it can only be specified by the keyword <strong>tail</strong>.

<p>
When a column configuration option is specified as <a href="#per-state_options">per-state</a>,
the state names are <strong>normal</strong>, <strong>active</strong>, <strong>pressed</strong> or <strong>up</strong>, i.e.
do not use item state names.

<p>
The following options are supported for columns:

<dl>
<dt><strong><strong>-arrow</strong></strong> <i class='arg'>direction</i><dd>
Indicates whether or not an arrow should be drawn in the column header.
<i class='arg'>Direction</i> must have one of the values
<strong>none</strong> (the default), <strong>up</strong>, or <strong>down</strong>.

<br><br>
<dt><strong><strong>-arrowbitmap</strong></strong> <i class='arg'>bitmap</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the bitmap to
use to draw the arrow if this column's -arrow option is not <strong>none</strong>.

<br><br>
<dt><strong><strong>-arrowimage</strong></strong> <i class='arg'>image</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the image to
use to draw the arrow if this column's -arrow option is not <strong>none</strong>.
If an image is specified for a certain state, it overrides the -arrowbitmap option.

<br><br>
<dt><strong><strong>-arrowside</strong></strong> <i class='arg'>side</i><dd>
Indicates on which side of the bitmap/image/text the arrow should be drawn.
<i class='arg'>Side</i> must be either <strong>left</strong> or <strong>right</strong> (the default).

<br><br>
<dt><strong><strong>-arrowgravity</strong></strong> <i class='arg'>side</i><dd>
Indicates onto which side an arrow should be packed,
if there is more space available for drawing the arrow then needed.
<i class='arg'>Side</i> must be either <strong>left</strong> (the default) or <strong>right</strong>.

<br><br>
<dt><strong><strong>-arrowpadx</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much padding to
leave on the left and right of the arrow.
<i class='arg'>Amount</i> may be a list
of two values to specify padding for left and right separately;
it defaults to 6.

<br><br>
<dt><strong><strong>-arrowpady</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much padding to
leave on the top and bottom of the arrow.
<i class='arg'>Amount</i> may be a list
of two values to specify padding for top and bottom separately;
it defaults to 0.

<br><br>
<dt><strong><strong>-bitmap</strong></strong> <i class='arg'>bitmap</i><dd>
Specifies the bitmap to display in the element
to the left of the column title.

<br><br>
<dt><strong><strong>-background</strong></strong> <i class='arg'>color</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the color to
use for the background of the column header.

<br><br>
<dt><strong><strong>-borderwidth</strong></strong> <i class='arg'>size</i><dd>
Specifies a non-negative value indicating the width
of the 3-D border to draw around the outside of the column header
 (if such a border is being drawn;  the <strong>-relief</strong> column option
determines this).
The value may have any of the forms acceptable to <strong>Tk_GetPixels</strong>.

<br><br>
<dt><strong><strong>-button</strong></strong> <i class='arg'>boolean</i><dd>
Indicates whether or not the column header should be treated like a pushbutton.
When this option is true, the default bindings track &lt;Button-1&gt; events
in the header and generate a &lt;Header-invoke&gt; event when a &lt;ButtonRelease-1&gt;
event occurs in the header. See <a href="#dynamic_events">DYNAMIC EVENTS</a>.

<br><br>
<dt><strong><strong>-expand</strong></strong> <i class='arg'>boolean</i><dd>
Indicates whether or not any extra horizontal space should be distributed
to this column.
This option has no effect if the <strong>-width</strong> option is set.

<br><br>
<dt><strong><strong>-font</strong></strong> <i class='arg'>fontName</i><dd>
Specifies the font to use for the column title inside the column header.

<br><br>
<dt><strong><strong>-image</strong></strong> <i class='arg'>image</i><dd>
Specifies the image to display in the element
to the left of the column title.
This option overrides the <strong>-bitmap</strong> column option.

<br><br>
<dt><strong><strong>-imagepadx</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much padding to
leave on the left and right of the image (or bitmap).
<i class='arg'>Amount</i> may be a list
of two values to specify padding for left and right separately;
it defaults to 6.

<br><br>
<dt><strong><strong>-imagepady</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much padding to
leave on the top and bottom of the image (or bitmap).
<i class='arg'>Amount</i> may be a list
of two values to specify padding for top and bottom separately;
it defaults to 0.

<br><br>
<dt><strong><strong>-itembackground</strong></strong> <i class='arg'>colorList</i><dd>
Specifies a list of zero or more colors, which are used as
alternating background colors for items in this column.
See also the <strong>-backgroundmode</strong> widget option for more on this.

<br><br>
<dt><strong><strong>-itemjustify</strong></strong> <i class='arg'>justification</i><dd>
This option determines how the item styles in this column line up with each other.
Must be one of <strong>left</strong>, <strong>center</strong>, or <strong>right</strong>. The default
value is an empty string (for compatibility with older versions), in which
case the column option <strong>-justify</strong> is used to align item styles in this
column.

<br><br>
<dt><strong><strong>-itemstyle</strong></strong> <i class='arg'>style</i><dd>
<i class='arg'>Style</i> is the name of a style that should be set in this column
for newly-created items.

<br><br>
<dt><strong><strong>-justify</strong></strong> <i class='arg'>justification</i><dd>
This option determines how the image and text in the column header are
positioned. It also affects the position of item styles in this column unless
the column option <strong>-itemjustify</strong> is specified.
Must be one of <strong>left</strong> (the default), <strong>center</strong>, or <strong>right</strong>.

<br><br>
<dt><strong><strong>-lock</strong></strong> <i class='arg'>lock</i><dd>
This option allows a column to stick to the left or right edge of the window.
A locked column scrolls vertically but not horizontally.
Must be one of <strong>none</strong> (the default), <strong>left</strong>, or <strong>right</strong>.

<br><br>
<dt><strong><strong>-maxwidth</strong></strong> <i class='arg'>size</i><dd>
Specifies the maximum size, in screen units, that will be permitted for this column.
If <i class='arg'>size</i> is an empty string, then there is no limit on the maximum size of the column.
This option has no effect if the <strong>-width</strong> option is set.

<br><br>
<dt><strong><strong>-minwidth</strong></strong> <i class='arg'>size</i><dd>
Specifies the minimum size, in screen units, that will be permitted for this column.
If <i class='arg'>size</i> is an empty string, then the minimum size of the column is zero.
This option has no effect if the <strong>-width</strong> option is set.

<br><br>
<dt><strong><strong>-resize</strong></strong> <i class='arg'>boolean</i><dd>
Specifies a boolean value that indicates whether the user should be allowed to
resize the column by dragging the edge of the column's header. Default is true.

<br><br>
<dt><strong><strong>-squeeze</strong></strong> <i class='arg'>boolean</i><dd>
Specifies a boolean value that indicates whether or not the column should
shrink when the content width of the treectrl is less than the total needed width
of all visible columns. Defaults to false, which means the column will not get
smaller than its needed width. The column will not get smaller than the value
of its <strong>-minwidth</strong> option, if specified. This option has no effect if the
<strong>-width</strong> option is set.

<br><br>
<dt><strong><strong>-state</strong></strong> <i class='arg'>state</i><dd>
Specifies one of three states for the column header: <strong>normal</strong>, <strong>active</strong>,
or <strong>pressed</strong>. The active state is used when the mouse is over the header.
The pressed state is used when the mouse button is pressed in the header.

<br><br>
<dt><strong><strong>-stepwidth</strong></strong> <i class='arg'>size</i><dd>
Deprecated. Use the treectrl's <strong>-itemwidthmultiple</strong> option instead.

<br><br>
<dt><strong><strong>-tags</strong></strong> <i class='arg'>tagList</i><dd>
<i class='arg'>TagList</i> is a list of tag names that can be used to identify the column.
See also the <b class='cmd'>column tag</b> command.

<br><br>
<dt><strong><strong>-text</strong></strong> <i class='arg'>text</i><dd>
Specifies a text string to be displayed as the column title.

<br><br>
<dt><strong><strong>-textcolor</strong></strong> <i class='arg'>color</i><dd>
Specifies a color, which should be used as foreground color
to display the column title.

<br><br>
<dt><strong><strong>-textlines</strong></strong> <i class='arg'>count</i><dd>
Specifies the maximum number of lines of text to display in the column title.
If this value is zero, the number of lines displayed is determined by any newline
characters and the effects of wrapping when the column width is less than
needed. The default is 1. Note: Under OSX/Aqua this value is always set to 1 when the
treectrl's <strong>-usetheme</strong> option is true, because the Appearance Manager
uses a fixed height for the column header; there is only room for a single line
of text.

<br><br>
<dt><strong><strong>-textpadx</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much padding to
leave on the left and right of the text.
<i class='arg'>Amount</i> may be a list
of two values to specify padding for left and right separately;
it defaults to 6.

<br><br>
<dt><strong><strong>-textpady</strong></strong> <i class='arg'>amount</i><dd>
<i class='arg'>Amount</i> specifies how much padding to
leave on the top and bottom of the text.
<i class='arg'>Amount</i> may be a list
of two values to specify padding for top and bottom separately;
it defaults to 0.

<br><br>
<dt><strong><strong>-uniform</strong></strong> <i class='arg'>group</i><dd>
When a non-empty value is supplied, this option places the column in a
<em>uniform group</em> with other columns that have the same value for
<strong>-uniform</strong>. The space for columns belonging to a uniform group is
allocated so that their sizes are always in strict proportion to their
<strong>-weight</strong> values.
This option is based on the grid geometry manager.

<br><br>
<dt><strong><strong>-visible</strong></strong> <i class='arg'>boolean</i><dd>
Indicates whether or not the column should be displayed.

<br><br>
<dt><strong><strong>-weight</strong></strong> <i class='arg'>integer</i><dd>
Sets the relative weight for apportioning any extra space among columns.
A weight of zero (0) indicates the column will not deviate from its requested
size.  A column whose weight is two will grow at twice the rate as a column of
weight one when extra space is allocated to columns.
This option is based on the grid geometry manager.

<br><br>
<dt><strong><strong>-width</strong></strong> <i class='arg'>size</i><dd>
Specifies a fixed width for the column. If this value is an empty string,
then the column width is calculated as the maximum of:
a) the width requested by items;
b) the width requested by the column's header;
and c) the column's <strong>-minwidth</strong> option.
This calculated width is also affected by the <strong>-expand</strong>,
<strong>-squeeze</strong>, <strong>-uniform</strong> and <strong>-weight</strong> options. In any case,
the calculated width will not be greater than the <strong>-maxwidth</strong> option,
if specified.

<br><br>
<dt><strong><strong>-widthhack</strong></strong> <i class='arg'>boolean</i><dd>
Deprecated. Use the treectrl's <strong>-itemwidthequal</strong> option instead.

</dl>

<h2><a name="column_description">COLUMN DESCRIPTION</a></h2>
<p>
Many of the commands and options for a treectrl take as an argument a
description of which column to operate on.
See the <a href="#examples">EXAMPLES</a> section for examples.
The initial part of a column description must begin with one of the following terms:

<dl>
<dt><i class='arg'>id</i><dd>
Specifies the unique column identifier, where <i class='arg'>id</i> should be
the return value of a prior call of the <b class='cmd'>column create</b> widget command.
See also the <strong>-columnprefix</strong> option.

<br><br>
<dt><i class='arg'>QUALIFIERS</i><dd>
Specifies a list of qualifiers. This gives the same result as <strong>all</strong> followed
by <i class='arg'>QUALIFIERS</i>; i.e., every column is tested for a match.

<br><br>
<dt><i class='arg'>tagExpr</i> <i class='arg'>QUALIFIERS</i><dd>
<i class='arg'>TagExpr</i> is a tag expression (see <a href="#item_and_column_tags">ITEM AND COLUMN TAGS</a>) against which
every column's tags are tested for a match.
This keyword cannot be followed by any modifiers unless a single column is
matched. You may run into trouble if <i class='arg'>tagExpr</i> looks like a column id
or other keyword; also, <i class='arg'>tagExpr</i> must look like a single list element
since column descriptions are properly-formed lists. To be safe you may want to
use the <strong>tag</strong> qualifier followed by <i class='arg'>tagExpr</i>.

<br><br>
<dt><strong>all</strong> <i class='arg'>QUALIFIERS</i><dd>
Indicates every column, including the tail column if the command allows it,
which match <i class='arg'>QUALIFIERS</i>.

<br><br>
<dt><strong>first</strong> <i class='arg'>QUALIFIERS</i><dd>
Indicates the leftmost column of the treectrl which matches <i class='arg'>QUALIFIERS</i>.

<br><br>
<dt><strong>end</strong> <i class='arg'>QUALIFIERS</i><dd>
<dt><strong>last</strong> <i class='arg'>QUALIFIERS</i><dd>
Indicates the rightmost column of the treectrl (but not the tail column)
which matches <i class='arg'>QUALIFIERS</i>.

<br><br>
<dt><strong>list</strong> <i class='arg'>columnDescs</i><dd>
<i class='arg'>ColumnDescs</i> is a list (a single argument, i.e. &quot;list {a b c}&quot; not &quot;list a b c&quot;)
of other column descriptions.
This keyword cannot be followed by any modifiers unless a single column is matched.

<br><br>
<dt><strong>order</strong> <i class='arg'>n</i> <i class='arg'>QUALIFIERS</i><dd>
Indicates the <i class='arg'>n</i>th column in the list of columns as returned by the
<b class='cmd'>column order</b> command.

<br><br>
<dt><strong>range</strong> <i class='arg'>first last</i> <i class='arg'>QUALIFIERS</i><dd>
<i class='arg'>First</i> and <i class='arg'>last</i> specify a range of columns.
This keyword cannot be followed by any modifiers unless a single column is specified.

<br><br>
<dt><strong>tail</strong><dd>
Indicates the ever-present tail column of the treectrl.

<br><br>
<dt><strong>tree</strong><dd>
Indicates the column specified by the -treecolumn option of the treectrl.
</dl>

<p>
The initial part of the column description (matching any of the values above)
may be followed by one or more <i class='arg'>modifier</i>s.
A modifier changes the column used relative to
the description up to this point.
It may be specified in any of the following forms:

<dl>

<dt><strong>next</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the column to the right matching <i class='arg'>QUALIFIERS</i>.

<br><br>
<dt><strong>prev</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the column to the left matching <i class='arg'>QUALIFIERS</i>.

</dl>

The word <i class='arg'>QUALIFIERS</i> above represents a sequence of zero or more of the
following terms that changes which column is chosen:

<dl>
<dt><strong>state</strong> <i class='arg'>stateList</i><dd>
<i class='arg'>StateList</i> is a list of column state names.
Only columns that have the given states set (or unset if the '!' prefix is used)
are considered.

<br><br>
<dt><strong>tag</strong> <i class='arg'>tagExpr</i><dd>
<i class='arg'>TagExpr</i> is a tag expression (see <a href="#item_and_column_tags">ITEM AND COLUMN TAGS</a>) against which
a column's tags are tested for a match.

<br><br>
<dt><strong>!tail</strong><dd>
When this qualifier is given, the tail column is not matched.

<br><br>
<dt><strong>visible</strong><dd>
When this qualifier is given, only columns whose <strong>-visible</strong> option is
TRUE are considered.

<br><br>
<dt><strong>!visible</strong><dd>
When this qualifier is given, only columns whose <strong>-visible</strong> option is
FALSE are considered.
</dl>

<h2><a name="states">STATES</a></h2>
<p>
For every item a set of boolean states is managed. These states play an
integral role in the appearance of each item.
The following states are predefined for every item:

<dl>
<dt><strong>active</strong><dd>
At all times this state is set for exactly one item. The active item is
used with keyboard navigation.
When the treectrl widget is created or when the active item is deleted,
the root item will become the active item.
This state can be modified by means of the widget command <b class='cmd'>activate</b>.

<br><br>
<dt><strong>enabled</strong><dd>
This state is set for every item when it is created.
Disabled items cannot be selected and are ignored by the default bindings
when navigating via the keyboard.
This state can be modified by means of the widget command <b class='cmd'>item enabled</b>.

<br><br>
<dt><strong>focus</strong><dd>
This state is set for every item,
if the treectrl widget currently has the focus.
It cannot be modified by means of a widget command,
but is maintained in reaction to the &lt;FocusIn&gt; and &lt;FocusOut&gt; events.

<br><br>
<dt><strong>open</strong><dd>
If this state is switched on,
the descendants of the item are displayed
- the item is expanded.
If this state is switched off,
the descendants of the item are not displayed
- the item is collapsed.
For a new item this state is switched on by default.
This state can be modified by means of the widget commands
<b class='cmd'>item expand</b>, <b class='cmd'>item collapse</b>, or <b class='cmd'>item toggle</b>.

<br><br>
<dt><strong>selected</strong><dd>
This state is set for every item included in the selection.
It can be modified by means of the widget command <b class='cmd'>selection</b>.
</dl>

<p>
By means of the <b class='cmd'>state define</b> widget command
up to 27 additional states can be defined.

<h2><a name="per-state_options">PER-STATE OPTIONS</a></h2>
<p>

The visual appearance of an item can change depending on the state the item
is in, such as being the active item, being included in the selection, being
collapsed, or some combination of those or other states. When a configuration
option is described as <em>per-state</em>, it means the option describes a
value which varies depending on the state of the item. If a per-state option is
specified as a single value, the value is used for all states. Otherwise
the per-state option must be specified as an even-numbered list. For example,
to use the font &quot;Times 12 bold&quot; in a <strong>text</strong> element regardless of the
item state you can write:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T element configure MyTextElement -font {{Times 12 bold}}
</pre></td></tr></table></p>
However, to use a different font when the item is selected you could write:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T element configure MyTextElement -font {{Courier 10} selected {Times 12 bold} {}}
</pre></td></tr></table></p>
In the example above, the -font option reads &quot;value stateList value stateList&quot;.
If <i class='arg'>stateList</i> is an empty list, the preceding <i class='arg'>value</i> is used regardless
of the item state. A non-empty stateList specifies a list of states which must be
set for the item in order to use the preceding value. Each stateList can also
include state names preceded by a ! sign, indicating the state must *not* be
set for the item. For example:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T element configure MyRectElement -fill {blue {selected focus} gray {selected !focus}}
</pre></td></tr></table></p>
In the example above, the <strong>rect</strong> element is filled with blue when the treectrl
has the focus and the item is selected. If the treectrl does not have the focus, the
example specifies that gray should be used for selected items. Also note that if the
item is not selected, no color is specified for the -fill option.
<p>
Each value-stateList pair is checked in order from left to right. The value
associated with the first stateList that matches the current item state is
used. So stateLists should be listed from most-specific to least-specific.
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T element configure MyRectElement -fill {gray {selected} blue {selected focus}}
</pre></td></tr></table></p>
Written this way, gray will always be used for selected items since
it appears first, and blue will never be used for selected items regardless
of the focus.
<p>
A value followed by an empty stateList should always be last since it will be
chosen regardless of the item's state.

<h2><a name="elements">ELEMENTS</a></h2>
<p>
Elements are the smallest building blocks
which are handled by a treectrl widget.
One or more elements together can be combined to a style,
which can be considered as a blueprint for an item.
An element can be of type <strong>bitmap</strong>, <strong>border</strong>, <strong>image</strong>,
<strong>rect</strong>, <strong>text</strong> or <strong>window</strong>.
For each element type there is a section below describing the options
which can modify an element of that type.

<p>
All of the element configuration options described below are unspecified
by default, meaning that no value whatsoever has been given to the option.
It may seem strange to you that a boolean option would be unspecified
instead of simply &quot;true&quot; or &quot;false&quot;. The reason for this is that when an
element displayed by an item has no value specified for an option, the element refers
to the master element created by the <b class='cmd'>element create</b> command for a
value for that option. This allows items which are displaying a certain
element to be redisplayed when the master element's options change.
The <b class='cmd'>item element configure</b> command can be used to override the
master element's configuration options for a specific item.

<h2><a name="bitmap_element">BITMAP ELEMENT</a></h2>
<p>
An element of type <strong>bitmap</strong> can be used to display a bitmap in an item.
The following options are supported for bitmap elements:

<dl>
<dt><strong><strong>-background</strong></strong> <i class='arg'>color</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option
the color to use for each of the bitmap's '0' valued pixels.
If the value for a certain state is an empty string (the default),
the bitmap is drawn transparent.

<br><br>
<dt><strong><strong>-bitmap</strong></strong> <i class='arg'>bitmap</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option
the bitmap to display in the element.

<br><br>
<dt><strong><strong>-draw</strong></strong> <i class='arg'>boolean</i><dd>
Deprecated; use the style layout option <strong>-draw</strong> instead.
Specifies as a <a href="#per-state_options">per-state</a> option
whether to draw the element. If the value for a certain state is an empty
string (the default), it is treated as true and the element will be drawn.

<br><br>
<dt><strong><strong>-foreground</strong></strong> <i class='arg'>color</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option
the color to use for each of the bitmap's '1' valued pixels.
If the value for a certain state is an empty string (the default),
the bitmap's foreground color is black.
</dl>

<h2><a name="border_element">BORDER ELEMENT</a></h2>
<p>
An element of type <strong>border</strong> can be used to display a 3D border in an item.
The following options are supported for border elements:

<dl>
<dt><strong><strong>-background</strong></strong> <i class='arg'>color</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option
the color to use for the background of the border.
If the value for a certain state is an empty string (the default), the
element will not be drawn.

<br><br>
<dt><strong><strong>-draw</strong></strong> <i class='arg'>boolean</i><dd>
Deprecated; use the style layout option <strong>-draw</strong> instead.
Specifies as a <a href="#per-state_options">per-state</a> option
whether to draw the element. If the value for a certain state is an empty
string (the default), it is treated as true and the element will be drawn.

<br><br>
<dt><strong><strong>-filled</strong></strong> <i class='arg'>boolean</i><dd>
Specifies whether the interior of the border should be filled with
the background color. If this option is unspecified (the default),
it it treated as false which means that only the edges of the
border will be drawn.

<br><br>
<dt><strong><strong>-height</strong></strong> <i class='arg'>size</i><dd>
Specifies the height of the border. If this value is unspecified
(the default), the border will be exactly as tall as its display area as
determined by the style layout options.

<br><br>
<dt><strong><strong>-relief</strong></strong> <i class='arg'>relief</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the
relief of the border. If the value for a certain state is an empty string
(the default), it is treated as flat.
For acceptable values see the description of the
<strong>-relief</strong> option in the <b class='cmd'>options</b> manual page.

<br><br>
<dt><strong><strong>-thickness</strong></strong> <i class='arg'>thickness</i><dd>
Specifies the thickness of the edges of the border.

<br><br>
<dt><strong><strong>-width</strong></strong> <i class='arg'>size</i><dd>
Specifies the width of the border. If this value is unspecified
(the default), the border will be exactly as wide as its display area as
determined by the style layout options.

</dl>

<h2><a name="image_element">IMAGE ELEMENT</a></h2>
<p>
An element of type <strong>image</strong> can be used to display an image in an item.
The following options are supported for image elements:

<dl>

<dt><strong><strong>-draw</strong></strong> <i class='arg'>boolean</i><dd>
Deprecated; use the style layout option <strong>-draw</strong> instead.
Specifies as a <a href="#per-state_options">per-state</a> option
whether to draw the element. If the value for a certain state is an empty
string (the default), it is treated as true and the element will be drawn.

<br><br>
<dt><strong><strong>-height</strong></strong> <i class='arg'>size</i><dd>
Specifies the requested height of the display area for this element.
If unspecified (the default), the element requests a height equal to the
height of the image, or zero if there is no image.

<br><br>
<dt><strong><strong>-image</strong></strong> <i class='arg'>image</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option
the image to display in the element.

<br><br>
<dt><strong><strong>-width</strong></strong> <i class='arg'>size</i><dd>
Specifies the requested width of the display area for this element.
If unspecified (the default), the element requests a width equal to the
width of the image, or zero if there is no image.

</dl>

<h2><a name="rectangle_element">RECTANGLE ELEMENT</a></h2>
<p>
An element of type <strong>rect</strong> can be used to display a rectangle in an item.
The following options are supported for rectangle elements:

<dl>

<dt><strong><strong>-draw</strong></strong> <i class='arg'>boolean</i><dd>
Deprecated; use the style layout option <strong>-draw</strong> instead.
Specifies as a <a href="#per-state_options">per-state</a> option
whether to draw the element. If the value for a certain state is an empty
string (the default), it is treated as true and the element will be drawn.

<br><br>
<dt><strong><strong>-fill</strong></strong> <i class='arg'>color</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the color to
be used to fill the rectangle's area.
If the color for a certain state is an empty string (the default), then
the rectangle will not be filled (but the outline may still be drawn).

<br><br>
<dt><strong><strong>-height</strong></strong> <i class='arg'>size</i><dd>
Specifies the height of the rectangle. If this value is unspecified
(the default), the rectangle will be exactly as tall as its display area as
determined by the style layout options.

<br><br>
<dt><strong><strong>-open</strong></strong> <i class='arg'>open</i><dd>
This option may be used to get an incomplete drawing of the outline.
<i class='arg'>Open</i> is a string that contains zero or more of the characters
<strong>n</strong>, <strong>s</strong>, <strong>e</strong> or <strong>w</strong>.
Each letter refers to a side (north, south, east, or west) that the outline
will not be drawn. 
The default is the empty string, which causes the outline to be drawn completely.

<br><br>
<dt><strong><strong>-outline</strong></strong> <i class='arg'>color</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the color to
be used to draw the outline of the rectangle.
If the color for a certain state is an empty string (the default),
then no outline is drawn for the rectangle.

<br><br>
<dt><strong><strong>-outlinewidth</strong></strong> <i class='arg'>outlineWidth</i><dd>
Specifies the width of the outline to be drawn around the rectangle's region.
<i class='arg'>outlineWidth</i> may be in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
If this option is specified as an empty string (the default), then no outline
is drawn.

<br><br>
<dt><strong><strong>-showfocus</strong></strong> <i class='arg'>boolean</i><dd>
Specifies a boolean value indicating whether
a &quot;focus ring&quot; should be drawn around the rectangle,
if the item containing the rectangle is the active item
and the treectrl widget currently has the focus.
If this option is specified as an empty string (the default),
then a focus rectangle is not drawn.

<br><br>
<dt><strong><strong>-width</strong></strong> <i class='arg'>size</i><dd>
Specifies the width of the rectangle. If this value is unspecified
(the default), the rectangle will be exactly as wide as its display area as
determined by the style layout options.

</dl>

<h2><a name="text_element">TEXT ELEMENT</a></h2>
<p>
An element of type <strong>text</strong> can be used to display a text in an item.
The following options are supported for text elements:

<dl>
<dt><strong><strong>-draw</strong></strong> <i class='arg'>boolean</i><dd>
Deprecated; use the style layout option <strong>-draw</strong> instead.
Specifies as a <a href="#per-state_options">per-state</a> option
whether to draw the element. If the value for a certain state is an empty
string (the default), it is treated as true and the element will be drawn.

<br><br>
<dt><strong><strong>-data</strong></strong> <i class='arg'>data</i><dd>
Specifies a value that together with the <strong>-datatype</strong> and <strong>-format</strong>
options will be displayed as text.

<br><br>
<dt><strong><strong>-datatype</strong></strong> <i class='arg'>dataType</i><dd>
Specifies the type of information in the <strong>-data</strong> option.
Acceptable values are <strong>double</strong>, <strong>integer</strong>, <strong>long</strong>,
<strong>string</strong>, or <strong>time</strong>.

<br><br>
<dt><strong><strong>-fill</strong></strong> <i class='arg'>color</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the
foreground color to use when displaying the text.
If the color for a certain state is an empty string (the default), then
the text will be displayed using the color specified by the treectrl's
<strong>-foreground</strong> option.

<br><br>
<dt><strong><strong>-format</strong></strong> <i class='arg'>formatString</i><dd>
This option specifies the format string used to display the value of the <strong>-data</strong> option.
If <strong>-datatype</strong> is <strong>time</strong>, <i class='arg'>formatString</i> should be
a valid format string for the Tcl <b class='cmd'>clock</b> command.
For all other <strong>-datatype</strong> values <i class='arg'>formatString</i> should be
a valid format string for the Tcl <b class='cmd'>format</b> command.
If this value is unspecified the following defaults are used:
for -datatype double &quot;%g&quot;, for -datatype integer &quot;%d&quot;, for -datatype long &quot;%ld&quot;,
for -datatype string &quot;%s&quot;, and for -datatype time the default format string of the Tcl <b class='cmd'>clock</b>
command.

<br><br>
<dt><strong><strong>-font</strong></strong> <i class='arg'>font</i><dd>
Specifies as a <a href="#per-state_options">per-state</a> option the font to
use when displaying the text.
If the font for a certain state is an empty string, the text is displayed
using the font specified by the treectrl's <strong>-font</strong> option.

<br><br>
<dt><strong><strong>-justify</strong></strong> <i class='arg'>how</i><dd>
Specifies how to justify the text when multiple lines are displayed.
<i class='arg'>How</i> must be one of the values <strong>left</strong>, <strong>right</strong>, or <strong>center</strong>.
If this option is specified as an empty string (the default), <strong>left</strong> is used.

<br><br>
<dt><strong><strong>-lines</strong></strong> <i class='arg'>lineCount</i><dd>
Specifies the maximum number of lines to display.
If more than <i class='arg'>lineCount</i> lines would be displayed, the last line will
be truncated with an ellipsis at the right.
If this option is specified as zero or an empty string (the default),
there is no limit to the number of lines displayed.

<br><br>
<dt><strong><strong>-text</strong></strong> <i class='arg'>string</i><dd>
<i class='arg'>String</i> specifies a string to be displayed by the element.
<i class='arg'>String</i> may contain newline characters in which case multiple lines of text
will be displayed.
If this option is specified, the <strong>-data</strong>, <strong>-datatype</strong>,
<strong>-format</strong>, and <strong>-textvariable</strong> options are ignored.

<br><br>
<dt><strong><strong>-textvariable</strong></strong> <i class='arg'>varName</i><dd>
Specifies the name of a variable.  The value of the variable is a string
to be displayed by the element;  if the variable value changes then the element
will automatically update itself to display the new value.
If this option is specified, the <strong>-data</strong>, <strong>-datatype</strong>,
and <strong>-format</strong> options are ignored.

<br><br>
<dt><strong><strong>-underline</strong></strong> <i class='arg'>charIndex</i><dd>
Specifies the integer index of a character to underline.
0 corresponds to the first character.
If <i class='arg'>charIndex</i> is unspecified (the default), less than zero or greater
than the index of the last displayed character, the underline is not drawn.

<br><br>
<dt><strong><strong>-width</strong></strong> <i class='arg'>size</i><dd>
Specifies the maximum line length in any of the forms acceptable to <strong>Tk_GetPixels</strong>.
For text to wrap lines the value of the <strong>-width</strong>
option must be less than the needed width of the text, or the display area
for this element must be less than the needed width of the text.
For the display area to be less than the needed width of the text,
one of the style layout options <strong>-maxwidth</strong>, <strong>-width</strong> or
<strong>-squeeze</strong> must be used.

<br><br>
<dt><strong><strong>-wrap</strong></strong> <i class='arg'>mode</i><dd>
<i class='arg'>Mode</i> specifies how to handle lines in the text that are longer than the
maximum line length.
Acceptable values are <strong>none</strong>, <strong>char</strong> or <strong>word</strong>.
If this option is unspecified (the default), <strong>word</strong> is used.
See the <strong>-width</strong> option for a description of how the maximum line
length is determined.

</dl>

<h2><a name="window_element">WINDOW ELEMENT</a></h2>
<p>
An element of type <strong>window</strong> can be used to display a Tk window in an item.
The following options are supported for window elements:

<dl>
<dt><strong><strong>-clip</strong></strong> <i class='arg'>boolean</i><dd>
Specifies whether the associated Tk window is a borderless frame which should
be used to clip its child window so it doesn't overlap the header, borders, or
other items or columns. When this option is true, the treectrl manages the
geometry of both the <strong>-window</strong> widget and its first child widget; in
this case the <strong>-window</strong> widget (which should be a borderless frame) is
kept sized and positioned so that it is never out-of-bounds.

<br><br>
<dt><strong><strong>-destroy</strong></strong> <i class='arg'>boolean</i><dd>
Specifies whether the associated Tk window should be destroyed when the
element is deleted. The element is deleted when the item containing the
element is deleted, when the column containing the element is deleted,
or when the style assigned to the item's column is changed. If this option
is unspecified (the default), it is treated as false and the Tk window
will not be destroyed.

<br><br>
<dt><strong><strong>-draw</strong></strong> <i class='arg'>boolean</i><dd>
Deprecated; use the style layout option <strong>-draw</strong> instead.
Specifies as a <a href="#per-state_options">per-state</a> option
whether to draw the element. If the value for a certain state is an empty
string (the default), it is treated as true and the element will be drawn.

<br><br>
<dt><strong><strong>-window</strong></strong> <i class='arg'>pathName</i><dd>
Specifies the window to associate with this element. The window specified by
<i class='arg'>pathName</i> must either be a child of the treectrl widget or a child of
some ancestor of the treectrl widget. <i class='arg'>PathName</i> may not refer to a
top-level window. This option cannot be specified by
the <b class='cmd'>element create</b> or <b class='cmd'>element configure</b> commands, only by the
<b class='cmd'>item element configure</b> command; i.e., the element must be associated
with a particular item.
</dl>

<h2><a name="item_description">ITEM DESCRIPTION</a></h2>
<p>
Many of the commands for a treectrl take as an argument a
description of which items to operate on. An item description is a properly-formed
tcl list of keywords and arguments.
The first word of an item description must be one of the following:

<dl>
<dt><i class='arg'>id</i><dd>
Specifies the unique item identifier, where <i class='arg'>id</i> should be
the return value of a prior call of the <b class='cmd'>item create</b> widget command,
or <strong>0</strong> to specify the ever-present root item. See also the
<strong>-itemprefix</strong> option.

<br><br>
<dt><i class='arg'>QUALIFIERS</i><dd>
Specifies a list of qualifiers. This gives the same result as <strong>all</strong> followed
by <i class='arg'>QUALIFIERS</i>; i.e., every item is tested for a match.

<br><br>
<dt><i class='arg'>tagExpr</i> <i class='arg'>QUALIFIERS</i><dd>
<i class='arg'>TagExpr</i> is a tag expression (see <a href="#item_and_column_tags">ITEM AND COLUMN TAGS</a>) against which
every item's tags are tested for a match.
This keyword cannot be followed by any modifiers unless a single item is
matched. You may run into trouble if <i class='arg'>tagExpr</i> looks like an item id
or other keyword; also, <i class='arg'>tagExpr</i> must look like a single list element
since item descriptions are properly-formed lists. To be safe you may want to
use the <strong>tag</strong> qualifier followed by <i class='arg'>tagExpr</i>.

<br><br>
<dt><strong>active</strong><dd>
Indicates the item that is currently active, i.e. normally
the item specified as argument of the last successful <b class='cmd'>activate</b>
widget command, or the root item if no such call happened yet.

<br><br>
<dt><strong>anchor</strong><dd>
Indicates the anchor item of the selection, i.e. normally
the item specified as argument of the last successful <b class='cmd'>selection anchor</b>
widget command, or the root item if no such call happened yet.

<br><br>
<dt><strong>all</strong> <i class='arg'>QUALIFIERS</i><dd>
Indicates every item including orphans which match <i class='arg'>QUALIFIERS</i>.
This keyword cannot be followed by any modifiers unless a single item is matched.

<br><br>
<dt><strong>first</strong> <i class='arg'>QUALIFIERS</i><dd>
Indicates the first item of the treectrl (the root item),
or the first item matching <i class='arg'>QUALIFIERS</i>.

<br><br>
<dt><strong>end</strong> <i class='arg'>QUALIFIERS</i><dd>
<dt><strong>last</strong> <i class='arg'>QUALIFIERS</i><dd>
Indicates the last item which matches <i class='arg'>QUALIFIERS</i>.

<br><br>
<dt><strong>list</strong> <i class='arg'>itemDescs</i><dd>
<i class='arg'>ItemDescs</i> is a list (a single argument, i.e. &quot;list {a b c}&quot; not &quot;list a b c&quot;)
of other item descriptions.
This keyword cannot be followed by any modifiers unless a single item is matched.

<br><br>
<dt><strong>nearest</strong> <i class='arg'>x y</i><dd>
Indicates the item nearest to the point given by <i class='arg'>x</i> and <i class='arg'>y</i>.

<br><br>
<dt><strong>rnc</strong> <i class='arg'>row column</i><dd>
Indicates the item in the given <i class='arg'>row</i> and <i class='arg'>column</i>.
The row and column corresponds to
the on-screen arrangement of items as determined by the -orient and -wrap
options.
You can memorize <strong>rnc</strong> as an abbreviation of &quot;row 'n' column&quot;.

<br><br>
<dt><strong>range</strong> <i class='arg'>first last</i> <i class='arg'>QUALIFIERS</i><dd>
<i class='arg'>First</i> and <i class='arg'>last</i> specify a range of items.
This keyword cannot be followed by any modifiers unless a single item is matched.

<br><br>
<dt><strong>root</strong><dd>
Indicates the root item of the treectrl.

</dl>

<p>
The initial part of the item description (matching any of the values above)
may be followed by one or more <i class='arg'>modifier</i>s.
A modifier changes the item used relative to
the description up to this point.
It may be specified in any of the following forms:

<dl>
<dt><strong>above</strong><dd>
Use the item one row above in this column.

<br><br>
<dt><strong>ancestors</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the ancestors of the item (like <b class='cmd'>item ancestors</b> but QUALIFIERS
may change which ancestors match).
This keyword cannot be followed by any modifiers.

<br><br>
<dt><strong>below</strong><dd>
Use the item one row below in this column.

<br><br>
<dt><strong>bottom</strong><dd>
Use the item in the last row of this column.

<br><br>
<dt><strong>child</strong> <i class='arg'>n</i> <i class='arg'>QUALIFIERS</i><dd>
Use the <i class='arg'>n</i>th child of the item.

<br><br>
<dt><strong>children</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the children of the item (like <b class='cmd'>item children</b> but QUALIFIERS
may change which children match).
This keyword cannot be followed by any modifiers.

<br><br>
<dt><strong>descendants</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the descendants of the item (like <b class='cmd'>item descendants</b> but QUALIFIERS
may change which descendants match).
This keyword cannot be followed by any modifiers.

<br><br>
<dt><strong>firstchild</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the first child of the item.

<br><br>
<dt><strong>lastchild</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the last child of the item.

<br><br>
<dt><strong>left</strong><dd>
Use the item one column to the left in the same row.

<br><br>
<dt><strong>leftmost</strong><dd>
Use the item of the first column in the same row.

<br><br>
<dt><strong>next</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the next item, which is the first item from the
following list: the first child, the next sibling or the next sibling of
the nearest ancestor which has one.

<br><br>
<dt><strong>nextsibling</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the next sibling of the item.

<br><br>
<dt><strong>parent</strong><dd>
Use the parent of the item.

<br><br>
<dt><strong>prev</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the last child of the previous sibling,
or the parent if there is no previous sibling.

<br><br>
<dt><strong>prevsibling</strong> <i class='arg'>QUALIFIERS</i><dd>
Use the previous sibling of the item.

<br><br>
<dt><strong>right</strong><dd>
Use the item one column to the right in the same row.

<br><br>
<dt><strong>rightmost</strong><dd>
Use the item of the last column in the same row.

<br><br>
<dt><strong>sibling</strong> <i class='arg'>n</i> <i class='arg'>QUALIFIERS</i><dd>
Use the <i class='arg'>n</i>th child of the item's parent.

<br><br>
<dt><strong>top</strong><dd>
Use the item in the first row of this column.
</dl>

The word <i class='arg'>QUALIFIERS</i> above represents a series of zero or more of the
following terms that changes which item is chosen:

<dl>
<dt><strong>depth</strong> <i class='arg'>depth</i><dd>
Matches items whose depth (as returned by the <b class='cmd'>depth</b> command) is equal to
<i class='arg'>depth</i>.

<br><br>
<dt><strong>state</strong> <i class='arg'>stateList</i><dd>
<i class='arg'>StateList</i> is a list of item state names (static and dynamic, see <a href="#states">STATES</a>).
Only items that have the given states set (or unset if the '!' prefix is used)
are considered.

<br><br>
<dt><strong>tag</strong> <i class='arg'>tagExpr</i><dd>
<i class='arg'>TagExpr</i> is a tag expression (see <a href="#item_and_column_tags">ITEM AND COLUMN TAGS</a>) against which
an item's tags are tested for a match.

<br><br>
<dt><strong>visible</strong><dd>
When this qualifier is given, only items that are displayed are considered.

<br><br>
<dt><strong>!visible</strong><dd>
When this qualifier is given, only items that are *not* displayed are considered.
</dl>

To get the first item in the list that is enabled:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T item id &quot;first state enabled&quot;
</pre></td></tr></table></p>

To get the ancestors that are not open of the last item in the list:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T item id &quot;last ancestors state !open&quot;
</pre></td></tr></table></p>

To get the visible descendants of the root item:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T item id &quot;root descendants visible&quot;
</pre></td></tr></table></p>

To get the every hidden item with tag &quot;a&quot; or &quot;b&quot;:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T item id &quot;all !visible tag a||b&quot;
$T item id &quot;!visible tag a||b&quot;
$T item id &quot;tag a||b !visible&quot;
$T item id &quot;a||b !visible&quot;
</pre></td></tr></table></p>

<h2><a name="events_and_script_substitutions">EVENTS AND SCRIPT SUBSTITUTIONS</a></h2>
<p>

The <i class='arg'>script</i> argument to <b class='cmd'>notify bind</b> is a Tcl script, which will be
evaluated whenever the given event is generated. <i class='arg'>Script</i> will be executed
in the same interpreter that the <b class='cmd'>notify bind</b> command was executed in,
and it will run at global level (only global variables will be accessible).
If <i class='arg'>script</i> contains any <strong>%</strong> characters, then the script will not be
evaluated directly.  Instead, a new script will be generated by replacing each
<strong>%</strong>, and the character following it, with information from the current
event. Unlike the regular Tk <b class='cmd'>bind</b> mechanism, each event generated by
a treectrl widget has its own set of %-substitutions.
<p>
The following %-substitutions are valid for all static events:
<dl>
<dt><strong>%%</strong><dd> Replaced with a single %
<br><br>
<dt><strong>%d</strong><dd> The detail name
<br><br>
<dt><strong>%e</strong><dd> The event name
<br><br>
<dt><strong>%P</strong><dd> The pattern, either &lt;event&gt; or &lt;event-detail&gt;
<br><br>
<dt><strong>%W</strong><dd> The object argument to the <b class='cmd'>notify bind</b> command
<br><br>
<dt><strong>%T</strong><dd> The treectrl widget which generated the event
<br><br>
<dt><strong>%?</strong><dd> A list of the format {char value char value ...} for each
%-substitution character and the value it is replaced by
</dl>

<p>
The following events may be generated by a treectrl widget:

<dl>
<dt><strong>&lt;ActiveItem&gt;</strong><dd>
Generated whenever the active item changes.
<br><br>
<dl>
<dt><strong>%c</strong><dd> The current active item
<br><br>
<dt><strong>%p</strong><dd> The previous active item
</dl>

<dt><strong>&lt;Collapse-before&gt;</strong><dd>
Generated before an item is collapsed.
<br><br>
<dl>
<dt><strong>%I</strong><dd> The item id
</dl>

<dt><strong>&lt;Collapse-after&gt;</strong><dd>
Generated after an item is collapsed.
<br><br>
<dl>
<dt><strong>%I</strong><dd> The item id
</dl>

<dt><strong>&lt;Expand-before&gt;</strong><dd>
Generated before an item is expanded. This event is useful if you want to add
child items to the item just before the item is expanded.
<br><br>
<dl>
<dt><strong>%I</strong><dd> The item id
</dl>

<dt><strong>&lt;Expand-after&gt;</strong><dd>
Generated after an item is expanded.
<br><br>
<dl>
<dt><strong>%I</strong><dd> The item id
</dl>

<dt><strong>&lt;ItemDelete&gt;</strong><dd>
Generated when items are about to be deleted by the <b class='cmd'>item delete</b> command.
<br><br>
<dl>
<dt><strong>%i</strong><dd> List of items ids being deleted.
</dl>

<dt><strong>&lt;ItemVisibility&gt;</strong><dd>
Generated when items become visible on screen and when items are no longer visible on screen.
This event is useful if you have a very large number of items and want to assign
styles only when items are actually going to be displayed.
<br><br>
<dl>
<dt><strong>%h</strong><dd> List of items ids which are no longer visible.
<br><br>
<dt><strong>%v</strong><dd> List of items ids which are now visible.
</dl>

<dt><strong>&lt;Scroll-x&gt;</strong><dd>
Generated whenever the view in the treectrl changes in such a way that a
horizontal scrollbar should be redisplayed.
<br><br>
<dl>
<dt><strong>%l</strong><dd> Same as the first fraction appended to <strong>-xscrollcommand</strong>. Think <em>lower</em>.
<br><br>
<dt><strong>%u</strong><dd> Same as the second fraction appended to <strong>-xscrollcommand</strong>. Think <em>upper</em>.
</dl>

<dt><strong>&lt;Scroll-y&gt;</strong><dd>
Generated whenever the view in the treectrl changes in such a way that a
vertical scrollbar should be redisplayed.
<br><br>
<dl>
<dt><strong>%l</strong><dd> Same as the first fraction appended to <strong>-yscrollcommand</strong>. Think <em>lower</em>.
<br><br>
<dt><strong>%u</strong><dd> Same as the second fraction appended to <strong>-yscrollcommand</strong>. Think <em>upper</em>.
</dl>

<dt><strong>&lt;Selection&gt;</strong><dd>
Generated whenever the selection changes. This event gives information about
how the selection changed.
<br><br>
<dl>
<dt><strong>%c</strong><dd> Same as the <b class='cmd'>selection count</b> widget command
<br><br>
<dt><strong>%D</strong><dd> List of newly-deselected item ids
<br><br>
<dt><strong>%S</strong><dd> List of newly-selected item ids
</dl>

</dl>

<h2><a name="dynamic_events">DYNAMIC EVENTS</a></h2>
<p>
In addition to the pre-defined static events such as &lt;ActiveItem&gt;
and &lt;Selection&gt;, new dynamic events can be created by using the
<b class='cmd'>notify install</b> command.

<p>
The following events may be generated by the library scripts:

<dl>

<dt><strong>&lt;ColumnDrag-begin&gt;</strong><dd>
<dt><strong>&lt;ColumnDrag-receive&gt;</strong><dd>
<dt><strong>&lt;ColumnDrag-end&gt;</strong><dd>
Generated whenever the user drag-and-drops a column header. The library scripts
do not actually move a dragged column. You must bind to the receive event to
move the column. See <a href="#examples">EXAMPLES</a>.
<br><br>
<dl>
<dt><strong>%C</strong><dd> The column that was dragged
<br><br>
<dt><strong>%b</strong><dd> The column to move the dragged column before
</dl>

<dt><strong>&lt;Drag-begin&gt;</strong><dd>
<dt><strong>&lt;Drag-receive&gt;</strong><dd>
<dt><strong>&lt;Drag-end&gt;</strong><dd>
Generated whenever the user drag-and-drops a file into a directory. This
event is generated by the filelist-bindings.tcl library code, which is not
used by default. See the &quot;Explorer&quot; demos.
<br><br>
<dl>
<dt><strong>%I</strong><dd> The item that the user dropped the dragged items on.
<br><br>
<dt><strong>%l</strong><dd> (lowercase L) The list of dragged items.
</dl>

<dt><strong>&lt;Edit-begin&gt;</strong><dd>
<dt><strong>&lt;Edit-accept&gt;</strong><dd>
<dt><strong>&lt;Edit-end&gt;</strong><dd>
The filelist-bindings.tcl code will display a text-editing window if the user
clicks on a selected file/folder name. See the &quot;Explorer&quot; demos.
<br><br>
<dl>
<dt><strong>%I</strong><dd> The item containing the edited text element
<br><br>
<dt><strong>%C</strong><dd> The column containing the edited text element
<br><br>
<dt><strong>%E</strong><dd> The name of the edited text element
<br><br>
<dt><strong>%t</strong><dd> The edited text
</dl>

<dt><strong>&lt;Header-invoke&gt;</strong><dd>
Generated whenever the user clicks and releases the left mouse button
in a column header if the column's -button option is true. You can bind a
script to this event to sort the list.
<br><br>
<dl>
<dt><strong>%C</strong><dd> The column whose header was clicked
</dl>

</dl>

The library scripts provide an example
of using a dynamic event called &lt;Header-invoke&gt;, which is generated when
the mouse button is released over a column header.
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
treectrl .t
.t notify install &lt;Header-invoke&gt;
.t notify bind ConsoleTag &lt;Header-invoke&gt; {
	puts &quot;header %C clicked in treectrl %T&quot;
}
proc ::TreeCtrl::Release1 {w x y} {
	...
	$w notify generate &lt;Header-invoke&gt; [list C $Priv(column)] \
		[list ::TreeCtrl::PercentsCmd $w]
	...
}
</pre></td></tr></table></p>
In the example a new treectrl widget is created and the &lt;Header-invoke&gt; event
is installed. For convenience there is no <i class='arg'>percentsCommand</i> argument to
<b class='cmd'>notify install</b>; instead the call to <b class='cmd'>notify generate</b> specifies
the %-substitution command. A script is
bound to the event with <b class='cmd'>notify bind</b> which will print out the column
number and widget
name to the console (in the demos, &lt;Header-invoke&gt; is used to sort the list
based on the column that was clicked). The <i class='arg'>charMap</i> argument to
<b class='cmd'>notify generate</b>
provides a list of %-substitution characters and values which is used by
::TreeCtrl::PercentsCmd. In this example any %C in any script bound to the
&lt;Header-invoke&gt; event will be replaced by the value of $Priv(column).

<h2><a name="default_bindings">DEFAULT BINDINGS</a></h2>
<p>
Tk automatically creates class bindings for treectrl widgets that give them
the following default behavior.
<ol>
<li>
Clicking mouse button 1 over an item positions the active cursor
on the item, sets the input focus to this widget,
and resets the selection of the widget to this item, if it is not
already in the selection.
<br><br>
<li>
Clicking mouse button 1 with the Control key down will reposition the
active cursor and add the item to the selection
without ever removing any items from the selection.
<br><br>
<li>
If the mouse is dragged out of the widget
while button 1 is pressed, the treectrl will automatically scroll to
make more items visible (if there are more items off-screen on the side
where the mouse left the window).
<br><br>
<li>
The Left and Right keys move the active cursor one item to the left or right;
for an hierarchical tree with vertical orientation nothing will happen,
since it has no two items in the same row.
The selection is set to include only the active item.
If Left or Right is typed with the Shift key down, then the active
cursor moves and the selection is extended to include the new item.
<br><br>
<li>
The Up and Down keys move the active cursor one item up or down.
The selection is set to include only the active item.
If Up or Down is typed with the Shift key down, then the active
cursor moves and the selection is extended to include the new item.
<br><br>
<li>
The Next and Prior keys move the active cursor forward or backwards
by one screenful, without affecting the selection.
<br><br>
<li>
Control-Next and Control-Prior scroll the view right or left by one page
without moving the active cursor or affecting the selection.
Control-Left and Control-Right behave the same.
<br><br>
<li>
The Home and End keys scroll to the left or right end of the widget
without moving the active cursor or affecting the selection.
<br><br>
<li>
The Control-Home and Control-End keys scroll to the top or bottom
of the widget, they also activate and select the first or last item.
If also the Shift key is down, then the active
cursor moves and the selection is extended to include the new item.
<br><br>
<li>
The Space and Select keys set the selection to the active item.
<br><br>
<li>
Control-/ selects the entire contents of the widget.
<br><br>
<li>
Control-\\ clears any selection in the widget.
<br><br>
<li>
The + and - keys expand or collapse the active item,
the Return key toggles the active item.
<br><br>
<li>
The mousewheel scrolls the view of the widget four lines up or down
depending on the direction, the wheel was turned.
The active cursor or the selection is not affected.
</ol>

<h2><a name="examples">EXAMPLES</a></h2>
<p>

Get the unique identifier for the leftmost visible column:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
set id [$T column index &quot;first visible&quot;]
</pre></td></tr></table></p>

Delete the leftmost column:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T column delete &quot;order 0&quot;
</pre></td></tr></table></p>

Take the visible column that is to the left of the last column, and move that
column in front of the tail column:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T column move &quot;last prev visible&quot; tail
</pre></td></tr></table></p>


Get the unique identifier for the first visible item:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
set id [$T item index &quot;first visible&quot;]
</pre></td></tr></table></p>

Delete the parent of the item that is under the point x,y:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T item delete &quot;nearest $x $y parent&quot;
</pre></td></tr></table></p>

Add the 10th child of the second child of the root item to the selection:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T selection add &quot;root firstchild nextsibling child 10&quot;
</pre></td></tr></table></p>


Move a column that the user drag-and-dropped:
<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
$T column dragconfigure -enable yes
$T notify install &lt;ColumnDrag-receive&gt;
$T notify bind MyTag &lt;ColumnDrag-receive&gt; {
	%T column move %C %b
}
</pre></td></tr></table></p>



<h2><a name="see_also">SEE ALSO</a></h2>
<p>
bind(3tk), bitmap(3tk), image(3tk), listbox(3tk), options(3tk)
<h2><a name="keywords">KEYWORDS</a></h2>
<p>
tree, widget
</body></html>