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
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.agw.ultimatelistctrl
.. highlight:: python
.. _wx.lib.agw.ultimatelistctrl.UltimateListMainWindow:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.ultimatelistctrl.UltimateListMainWindow**
==========================================================================================================================================
This is the main widget implementation of :class:`UltimateListCtrl`.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>UltimateListMainWindow</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.agw.ultimatelistctrl.UltimateListMainWindow_inheritance.png" alt="Inheritance diagram of UltimateListMainWindow" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="65,5,167,35"/> <area shape="rect" id="node2" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="117,83,228,112"/> <area shape="rect" id="node6" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="113,160,233,189"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="191,5,272,35"/> <area shape="rect" id="node4" href="wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.html" title="wx.lib.agw.ultimatelistctrl.UltimateListMainWindow" alt="" coords="5,469,341,499"/> <area shape="rect" id="node5" href="wx.ScrolledWindow.html" title="wx.ScrolledWindow" alt="" coords="103,392,243,421"/> <area shape="rect" id="node7" href="wx.Window.html" title="wx.Window" alt="" coords="129,237,217,267"/> </map>
</p>
|
|super_classes| Known Superclasses
==================================
:class:`wx.ScrolledWindow`
|
|method_summary| Methods Summary
================================
=========================================================================================== ================================================================================
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.__init__` Default class constructor.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.AutoCheckChild` Checks/unchecks all the items.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.AutoToggleChild` Toggles all the items.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.CacheLineData` Saves the current line attributes.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ChangeCurrent` Changes the current line to the specified one.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.CheckItem` Actually checks/uncheks an item, sending (eventually) the two
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DeleteAllItems` Deletes all items in the :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DeleteColumn` Deletes the specified column.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DeleteEverything` Deletes all items in the :class:`UltimateListCtrl`, resetting column widths to zero.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DeleteItem` Deletes the specified item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DeleteItemWindow` Deletes the window associated to an item (if any).
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DoDeleteAllItems` Actually performs the deletion of all the items.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DoGetBestSize` Gets the size which best suits the window: for a control, it would be the
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DragFinish` A drag and drop operation has just finished.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DrawCheckbox` Draws the item checkbox/radiobutton image.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DrawDnDArrow` Draws a drag and drop visual representation of an arrow.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.DrawImage` Draws one of the item images.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.EditLabel` Starts editing an item label.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.EnableItem` Enables/disables an item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.EnableSelectionGradient` Globally enables/disables drawing of gradient selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.EnableSelectionVista` Globally enables/disables drawing of Windows Vista selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.EnsureVisible` Ensures this item is visible.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.FindItem` Find an item whose label matches this string.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.FindItemAtPos` Find an item nearest this position.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.FindItemData` Find an item whose data matches this data.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetBackgroundImage` Returns the :class:`UltimateListCtrl` background image (if any).
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetCheckboxImageSize` Returns the checkbox/radiobutton image size.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetColumn` Returns information about this column.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetColumnCount` Returns the total number of columns in the :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetColumnCustomRenderer` Returns the custom renderer used to draw the column header
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetColumnWidth` Returns the column width for the input column.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetControlBmp` Returns a native looking checkbox or radio button bitmap.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetCountPerPage` Returns the number of items that can fit vertically in the visible area
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetDisabledTextColour` Returns the items disabled colour.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetDummyLine` Returns a dummy line.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetFirstGradientColour` Returns the first gradient colour for gradient-style selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetGradientStyle` Returns the gradient style for gradient-style selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetHeaderWidth` Returns the header window width, in pixels.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetHighlightBrush` Returns the brush to use for the item highlighting.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetHyperTextFont` Returns the font used to render an hypertext item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetHyperTextNewColour` Returns the colour used to render a non-visited hypertext item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetHyperTextVisitedColour` Returns the colour used to render a visited hypertext item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetImageSize` Returns the image size for the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItem` Returns the information about the input item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemCount` Returns the number of items in the :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemCustomRenderer` Returns the custom renderer used to draw the input item (if any).
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemKind` Returns the item kind.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemOverFlow` Returns if the item is in the overflow state.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemPosition` Returns the position of the item, in icon or small icon view.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemRect` Returns the rectangle representing the item's size and position, in physical
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemSpacing` Returns the spacing between item texts and icons, in pixels.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemState` Returns the item state flags for the input item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemText` Returns the item text.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemTextSize` Returns the item width, in pixels, considering only the item text.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemVisited` Returns whether an hypertext item was visited.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemWidthWithImage` Returns the item width, in pixels, considering the item text and its images.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemWindow` Returns the window associated to the item (if any).
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetItemWindowEnabled` Returns whether the window associated to the item is enabled.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLine` Returns the line data for the given index.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineCheckboxRect` Returns the line client rectangle for the item checkbox image only.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineHeight` Returns the line height for a specific item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineHighlightRect` Returns the line client rectangle when the line is highlighted.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineIconRect` Returns the line client rectangle for the item image only.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineLabelRect` Returns the line client rectangle for the item text only.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineRect` Returns the line client rectangle.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineSize` Returns the size of the total line client rectangle.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetLineY` Returns the line `y` position.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetListCtrl` Returns the parent widget, an instance of :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetMainWindowOfCompositeControl` Returns the :class:`UltimateListMainWindow` parent.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetNextActiveItem` Returns the next active item. Used Internally at present.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetNextItem` Searches for an item with the given `geometry` or `state`, starting from `item`
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetRuleColour` Returns the colour to be used for drawing the horizontal and vertical rules.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetSecondGradientColour` Returns the second gradient colour for gradient-style selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetSelectedItemCount` Returns the number of selected items in :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetSubItemRect` Returns the rectangle representing the size and position, in physical coordinates,
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetTextLength` Returns the text width for the input string.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetTotalWidth` Returns the total width of the columns in :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetUserLineHeight` Returns the custom value for the :class:`UltimateListMainWindow` item height, if previously set with
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetViewRect` Returns the rectangle taken by all items in the control. In other words,
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetVisibleLinesRange` Returns the range of visible items on screen.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.GetWaterMark` Returns the :class:`UltimateListCtrl` watermark image (if any), displayed in the
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HandleHyperLink` Handles the hyperlink items, sending the ``EVT_LIST_ITEM_HYPERLINK`` event.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HasAGWFlag` Returns ``True`` if the window has the given `flag` bit set.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HasCurrent` Returns ``True`` if the current item has been set, either programmatically
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HasFocus` Returns ``True`` if the window has focus.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HasFooter` Returns ``True`` if the footer window is shown.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HasHeader` Returns ``True`` if the header window is shown.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HideWindows` Hides the windows associated to the items. Used internally.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HighlightAll` Highlights/unhighlights all the lines in :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HighlightLine` Highlights a line in :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HighlightLines` Highlights a range of lines in :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HitTest` HitTest method for a :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.HitTestLine` HitTest method for a :class:`UltimateListCtrl` line.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.Init` Initializes the :class:`UltimateListMainWindow` widget.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.InReportView` Returns ``True`` if the window is in report mode.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.InsertColumn` Inserts a column into :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.InsertItem` Inserts an item into :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.InTileView` Returns ``True`` if the window is in tile mode (partially implemented).
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsColumnShown` Returns ``True`` if the input column is shown, ``False`` if it is hidden.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsEmpty` Returns ``True`` if the window has no items in it.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsHighlighted` Returns ``True`` if the input line is highlighted.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsItemChecked` Returns whether an item is checked or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsItemEnabled` Returns whether an item is enabled or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsItemHyperText` Returns whether an item is hypertext or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsSingleSel` Returns ``True`` if we are in single selection mode, ``False`` if multi selection.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.IsVirtual` Returns ``True`` if the window has the ``ULC_VIRTUAL`` style set.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.MoveToFocus` Brings tyhe current item into view.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.MoveToItem` Scrolls the input item into view.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnArrowChar` Handles the keyboard arrows key events.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnChar` Handles the ``wx.EVT_CHAR`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnChildFocus` Handles the ``wx.EVT_CHILD_FOCUS`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnCompareItems` Returns whether 2 lines have the same index.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnEraseBackground` Handles the ``wx.EVT_ERASE_BACKGROUND`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnHoverTimer` Handles the ``wx.EVT_TIMER`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnKeyDown` Handles the ``wx.EVT_KEY_DOWN`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnKeyUp` Handles the ``wx.EVT_KEY_UP`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnKillFocus` Handles the ``wx.EVT_KILL_FOCUS`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnMouse` Handles the ``wx.EVT_MOUSE_EVENTS`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnPaint` Handles the ``wx.EVT_PAINT`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnRenameAccept` Called by :class:`UltimateListTextCtrl`, to accept the changes and to send the
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnRenameCancelled` Called by :class:`UltimateListTextCtrl`, to cancel the changes and to send the
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnRenameTimer` The timer for renaming has expired. Start editing.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnScroll` Handles the ``wx.EVT_SCROLLWIN`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.OnSetFocus` Handles the ``wx.EVT_SET_FOCUS`` event for :class:`UltimateListMainWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.PaintWaterMark` Draws a watermark at the bottom right of :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.RecalculatePositions` Recalculates all the items positions, and sets the scrollbars positions
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.RefreshAfter` Redraws all the lines after the input one.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.RefreshAll` Refreshes the entire :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.RefreshLine` Redraws the input line.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.RefreshLines` Redraws a range of lines in :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.RefreshSelected` Redraws the selected lines.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ResetCurrent` Resets the current item to ``None``.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ResetLineDimensions` Resets the line dimensions, so that client rectangles and positions are
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ResetTextControl` Called by :class:`UltimateListTextCtrl` when it marks itself for deletion.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ResetVisibleLinesRange` Forces us to recalculate the range of visible lines.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ResizeColumns` If ``ULC_AUTOSIZE_FILL`` was passed to :meth:`UltimateListCtrl.SetColumnWidth() <UltimateListCtrl.SetColumnWidth>` then
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ReverseHighlight` Toggles the line state and refreshes it.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.ScrollList` Scrolls the :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SendNotify` Actually sends a :class:`UltimateListEvent`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetBackgroundImage` Sets the :class:`UltimateListCtrl` background image.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetColumn` Sets information about this column.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetColumnCustomRenderer` Associate a custom renderer to this column's header
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetColumnWidth` Sets the column width.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetDisabledTextColour` Sets the items disabled colour.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetFirstGradientColour` Sets the first gradient colour for gradient-style selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetFont` Overridden base class virtual to reset the line height when the font changes.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetGradientStyle` Sets the gradient style for gradient-style selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetHyperTextFont` Sets the font used to render hypertext items.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetHyperTextNewColour` Sets the colour used to render a non-visited hypertext item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetHyperTextVisitedColour` Sets the colour used to render a visited hypertext item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetImageList` Sets the image list associated with the control.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetImageListCheck` Sets the checkbox/radiobutton image list.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItem` Sets information about the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemCount` This method can only be used with virtual :class:`UltimateListCtrl`. It is used to
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemCustomRenderer` Associate a custom renderer to this item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemHyperText` Sets whether the item is hypertext or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemKind` Sets the item kind.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemOverFlow` Sets the item in the overflow/non overflow state.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemSpacing` Sets the spacing between item texts and icons.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemState` Sets the item state flags for the input item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemStateAll` Sets the item state flags for all the items.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemText` Sets the item text.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemVisited` Sets whether an hypertext item was visited.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemWindow` Sets the window for the given item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetItemWindowEnabled` Enables/disables the window associated to the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetReportView` Sets whether :class:`UltimateListCtrl` is in report view or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetSecondGradientColour` Sets the second gradient colour for gradient-style selections.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetUserLineHeight` Sets a custom value for the :class:`UltimateListMainWindow` item height.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SetWaterMark` Sets the :class:`UltimateListCtrl` watermark image to be displayed in the bottom
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.SortItems` Call this function to sort the items in the :class:`UltimateListCtrl`. Sorting is done
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.TileBackground` Tiles the background image to fill all the available area.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListMainWindow.UpdateCurrent` Updates the current line selection.
=========================================================================================== ================================================================================
|
|api| Class API
===============
.. class:: UltimateListMainWindow(wx.ScrolledWindow)
This is the main widget implementation of :class:`UltimateListCtrl`.
.. method:: __init__(self, parent, id, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=0, name="listctrlmainwindow")
Default class constructor.
:param `parent`: parent window. Must not be ``None``;
:param `id`: window identifier. A value of -1 indicates a default value;
:param `pos`: the control position. A value of (-1, -1) indicates a default position,
chosen by either the windowing system or wxPython, depending on platform;
:param `size`: the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform;
:param `style`: the underlying :class:`ScrolledWindow` window style;
:param `agwStyle`: the AGW-specific window style; can be almost any combination of the following
bits:
=============================== =========== ====================================================================================================
Window Styles Hex Value Description
=============================== =========== ====================================================================================================
``ULC_VRULES`` 0x1 Draws light vertical rules between rows in report mode.
``ULC_HRULES`` 0x2 Draws light horizontal rules between rows in report mode.
``ULC_ICON`` 0x4 Large icon view, with optional labels.
``ULC_SMALL_ICON`` 0x8 Small icon view, with optional labels.
``ULC_LIST`` 0x10 Multicolumn list view, with optional small icons. Columns are computed automatically, i.e. you don't set columns as in ``ULC_REPORT``. In other words, the list wraps, unlike a :class:`ListBox`.
``ULC_REPORT`` 0x20 Single or multicolumn report view, with optional header.
``ULC_ALIGN_TOP`` 0x40 Icons align to the top. Win32 default, Win32 only.
``ULC_ALIGN_LEFT`` 0x80 Icons align to the left.
``ULC_AUTOARRANGE`` 0x100 Icons arrange themselves. Win32 only.
``ULC_VIRTUAL`` 0x200 The application provides items text on demand. May only be used with ``ULC_REPORT``.
``ULC_EDIT_LABELS`` 0x400 Labels are editable: the application will be notified when editing starts.
``ULC_NO_HEADER`` 0x800 No header in report mode.
``ULC_NO_SORT_HEADER`` 0x1000 No Docs.
``ULC_SINGLE_SEL`` 0x2000 Single selection (default is multiple).
``ULC_SORT_ASCENDING`` 0x4000 Sort in ascending order. (You must still supply a comparison callback in :meth:`ListCtrl.SortItems`.)
``ULC_SORT_DESCENDING`` 0x8000 Sort in descending order. (You must still supply a comparison callback in :meth:`ListCtrl.SortItems`.)
``ULC_TILE`` 0x10000 Each item appears as a full-sized icon with a label of one or more lines beside it (partially implemented).
``ULC_NO_HIGHLIGHT`` 0x20000 No highlight when an item is selected.
``ULC_STICKY_HIGHLIGHT`` 0x40000 Items are selected by simply hovering on them, with no need to click on them.
``ULC_STICKY_NOSELEVENT`` 0x80000 Don't send a selection event when using ``ULC_STICKY_HIGHLIGHT`` style.
``ULC_SEND_LEFTCLICK`` 0x100000 Send a left click event when an item is selected.
``ULC_HAS_VARIABLE_ROW_HEIGHT`` 0x200000 The list has variable row heights.
``ULC_AUTO_CHECK_CHILD`` 0x400000 When a column header has a checkbox associated, auto-check all the subitems in that column.
``ULC_AUTO_TOGGLE_CHILD`` 0x800000 When a column header has a checkbox associated, toggle all the subitems in that column.
``ULC_AUTO_CHECK_PARENT`` 0x1000000 Only meaningful foe checkbox-type items: when an item is checked/unchecked its column header item is checked/unchecked as well.
``ULC_SHOW_TOOLTIPS`` 0x2000000 Show tooltips for ellipsized items/subitems (text too long to be shown in the available space) containing the full item/subitem text.
``ULC_HOT_TRACKING`` 0x4000000 Enable hot tracking of items on mouse motion.
``ULC_BORDER_SELECT`` 0x8000000 Changes border colour whan an item is selected, instead of highlighting the item.
``ULC_TRACK_SELECT`` 0x10000000 Enables hot-track selection in a list control. Hot track selection means that an item is automatically selected when the cursor remains over the item for a certain period of time. The delay is retrieved on Windows using the `win32api` call `win32gui.SystemParametersInfo(win32con.SPI_GETMOUSEHOVERTIME)`, and is defaulted to 400ms on other platforms. This style applies to all views of `UltimateListCtrl`.
``ULC_HEADER_IN_ALL_VIEWS`` 0x20000000 Show column headers in all view modes.
``ULC_NO_FULL_ROW_SELECT`` 0x40000000 When an item is selected, the only the item in the first column is highlighted.
``ULC_FOOTER`` 0x80000000 Show a footer too (only when header is present).
``ULC_USER_ROW_HEIGHT`` 0x100000000 Allows to set a custom row height (one value for all the items, only in report mode).
=============================== =========== ====================================================================================================
:param `name`: the window name.
.. method:: AutoCheckChild(self, isChecked, column)
Checks/unchecks all the items.
:param `isChecked`: ``True`` to check the items, ``False`` to uncheck them;
:param `column`: the column to which the items belongs to.
:note: This method is meaningful only for checkbox-like and radiobutton-like items.
.. method:: AutoToggleChild(self, column)
Toggles all the items.
:param `column`: the column to which the items belongs to.
:note: This method is meaningful only for checkbox-like and radiobutton-like items.
.. method:: CacheLineData(self, line)
Saves the current line attributes.
:param `line`: an instance of :class:`UltimateListLineData`.
:note: This method is used only if the :class:`UltimateListCtrl` has the ``ULC_VIRTUAL``
style set.
.. method:: ChangeCurrent(self, current)
Changes the current line to the specified one.
:param `current`: an integer specifying the index of the current line.
.. method:: CheckItem(self, item, checked=True, sendEvent=True)
Actually checks/uncheks an item, sending (eventually) the two
events ``EVT_LIST_ITEM_CHECKING`` / ``EVT_LIST_ITEM_CHECKED``.
:param `item`: an instance of :class:`UltimateListItem`;
:param `checked`: ``True`` to check an item, ``False`` to uncheck it;
:param `sendEvent`: ``True`` to send a {UltimateListEvent}, ``False`` otherwise.
:note: This method is meaningful only for checkbox-like and radiobutton-like items.
.. method:: DeleteAllItems(self)
Deletes all items in the :class:`UltimateListCtrl`.
:note: This function does not send the ``EVT_LIST_DELETE_ITEM`` event because
deleting many items from the control would be too slow then (unlike :meth:`~UltimateListMainWindow.DeleteItem`).
.. method:: DeleteColumn(self, col)
Deletes the specified column.
:param `col`: the index of the column to delete.
.. method:: DeleteEverything(self)
Deletes all items in the :class:`UltimateListCtrl`, resetting column widths to zero.
.. method:: DeleteItem(self, lindex)
Deletes the specified item.
:param `lindex`: the index of the item to delete.
:note: This function sends the ``EVT_LIST_DELETE_ITEM`` event for the item
being deleted.
.. method:: DeleteItemWindow(self, item)
Deletes the window associated to an item (if any).
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: DoDeleteAllItems(self)
Actually performs the deletion of all the items.
.. method:: DoGetBestSize(self)
Gets the size which best suits the window: for a control, it would be the
minimal size which doesn't truncate the control, for a panel - the same size
as it would have after a call to `Fit()`.
.. method:: DragFinish(self, event)
A drag and drop operation has just finished.
:param `event`: a :class:`MouseEvent` event to be processed.
.. method:: DrawCheckbox(self, dc, x, y, kind, checked, enabled)
Draws the item checkbox/radiobutton image.
:param `dc`: an instance of :class:`wx.DC`;
:param `x`: the x position where to draw the image;
:param `y`: the y position where to draw the image;
:param `kind`: may be one of the following integers:
=============== ==========================
Item Kind Description
=============== ==========================
0 A normal item
1 A checkbox-like item
2 A radiobutton-type item
=============== ==========================
:param `checked`: ``True`` if the item is checked, ``False`` otherwise;
:param `enabled`: ``True`` if the item is enabled, ``False`` if it is disabled.
.. method:: DrawDnDArrow(self)
Draws a drag and drop visual representation of an arrow.
.. method:: DrawImage(self, index, dc, x, y, enabled)
Draws one of the item images.
:param `index`: the index of the image inside the image list;
:param `dc`: an instance of :class:`wx.DC`;
:param `x`: the x position where to draw the image;
:param `y`: the y position where to draw the image;
:param `enabled`: ``True`` if the item is enabled, ``False`` if it is disabled.
.. method:: EditLabel(self, item)
Starts editing an item label.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: EnableItem(self, item, enable=True)
Enables/disables an item.
:param `item`: an instance of :class:`UltimateListItem`;
:param `enable`: ``True`` to enable the item, ``False`` otherwise.
.. method:: EnableSelectionGradient(self, enable=True)
Globally enables/disables drawing of gradient selections.
:param `enable`: ``True`` to enable gradient-style selections, ``False``
to disable it.
:note: Calling this method disables any Vista-style selection previously
enabled.
.. method:: EnableSelectionVista(self, enable=True)
Globally enables/disables drawing of Windows Vista selections.
:param `enable`: ``True`` to enable Vista-style selections, ``False`` to
disable it.
:note: Calling this method disables any gradient-style selection previously
enabled.
.. method:: EnsureVisible(self, index)
Ensures this item is visible.
:param `index`: the index of the item to scroll into view.
.. method:: FindItem(self, start, string, partial=False)
Find an item whose label matches this string.
:param `start`: the starting point of the input `string` or the beginning
if `start` is -1;
:param `string`: the string to look for matches;
:param `partial`: if ``True`` then this method will look for items which
begin with `string`.
:note: The string comparison is case insensitive.
.. method:: FindItemAtPos(self, pt)
Find an item nearest this position.
:param `pt`: an instance of :class:`wx.Point`.
.. method:: FindItemData(self, start, data)
Find an item whose data matches this data.
:param `start`: the starting point of the input `data` or the beginning
if `start` is -1;
:param `data`: the data to look for matches.
.. method:: GetBackgroundImage(self)
Returns the :class:`UltimateListCtrl` background image (if any).
:note: At present, the background image can only be used in "tile" mode.
.. todo:: Support background images also in stretch and centered modes.
.. method:: GetCheckboxImageSize(self)
Returns the checkbox/radiobutton image size.
.. method:: GetColumn(self, col)
Returns information about this column.
:param `col`: an integer specifying the column index.
.. method:: GetColumnCount(self)
Returns the total number of columns in the :class:`UltimateListCtrl`.
.. method:: GetColumnCustomRenderer(self, col)
Returns the custom renderer used to draw the column header
:param `col`: the column index.
.. method:: GetColumnWidth(self, col)
Returns the column width for the input column.
:param `col`: an integer specifying the column index.
.. method:: GetControlBmp(self, checkbox=True, checked=False, enabled=True, x=16, y=16)
Returns a native looking checkbox or radio button bitmap.
:param `checkbox`: ``True`` to get a checkbox image, ``False`` for a radiobutton
one;
:param `checked`: ``True`` if the control is marked, ``False`` if it is not;
:param `enabled`: ``True`` if the control is enabled, ``False`` if it is not;
:param `x`: the width of the bitmap, in pixels;
:param `y`: the height of the bitmap, in pixels.
.. method:: GetCountPerPage(self)
Returns the number of items that can fit vertically in the visible area
of the :class:`UltimateListCtrl` (list or report view) or the total number of
items in the list control (icon or small icon view).
.. method:: GetDisabledTextColour(self)
Returns the items disabled colour.
.. method:: GetDummyLine(self)
Returns a dummy line.
:note: This method is used only if the :class:`UltimateListCtrl` has the ``ULC_VIRTUAL``
style set.
.. method:: GetFirstGradientColour(self)
Returns the first gradient colour for gradient-style selections.
.. method:: GetGradientStyle(self)
Returns the gradient style for gradient-style selections.
:return: 0 for horizontal gradient-style selections, 1 for vertical
gradient-style selections.
.. method:: GetHeaderWidth(self)
Returns the header window width, in pixels.
.. method:: GetHighlightBrush(self)
Returns the brush to use for the item highlighting.
.. method:: GetHyperTextFont(self)
Returns the font used to render an hypertext item.
.. method:: GetHyperTextNewColour(self)
Returns the colour used to render a non-visited hypertext item.
.. method:: GetHyperTextVisitedColour(self)
Returns the colour used to render a visited hypertext item.
.. method:: GetImageSize(self, index)
Returns the image size for the item.
:param `index`: the image index.
.. method:: GetItem(self, item, col=0)
Returns the information about the input item.
:param `item`: an instance of :class:`UltimateListItem`;
:param `col`: the column to which the item belongs to.
.. method:: GetItemCount(self)
Returns the number of items in the :class:`UltimateListCtrl`.
.. method:: GetItemCustomRenderer(self, item)
Returns the custom renderer used to draw the input item (if any).
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetItemKind(self, item)
Returns the item kind.
:param `item`: an instance of :class:`UltimateListItem`.
:see: :meth:`~UltimateListMainWindow.SetItemKind` for a list of valid item kinds.
.. method:: GetItemOverFlow(self, item)
Returns if the item is in the overflow state.
An item/subitem may overwrite neighboring items/subitems if its text would
not normally fit in the space allotted to it.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetItemPosition(self, item)
Returns the position of the item, in icon or small icon view.
:param `item`: the row in which the item lives.
.. method:: GetItemRect(self, item)
Returns the rectangle representing the item's size and position, in physical
coordinates.
:param `item`: the row in which the item lives.
.. method:: GetItemSpacing(self, isSmall=False)
Returns the spacing between item texts and icons, in pixels.
:param `isSmall`: ``True`` if using a ``wx.IMAGE_LIST_SMALL`` image list,
``False`` if using a ``wx.IMAGE_LIST_NORMAL`` image list.
.. method:: GetItemState(self, item, stateMask)
Returns the item state flags for the input item.
:param `item`: the index of the item;
:param `stateMask`: the bitmask for the state flag.
:see: :meth:`~UltimateListMainWindow.SetItemStateAll` for a list of valid state flags.
.. method:: GetItemText(self, item)
Returns the item text.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetItemTextSize(self, item)
Returns the item width, in pixels, considering only the item text.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetItemVisited(self, item)
Returns whether an hypertext item was visited.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetItemWidthWithImage(self, item)
Returns the item width, in pixels, considering the item text and its images.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetItemWindow(self, item)
Returns the window associated to the item (if any).
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetItemWindowEnabled(self, item)
Returns whether the window associated to the item is enabled.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: GetLine(self, n)
Returns the line data for the given index.
:param `n`: the line index.
.. method:: GetLineCheckboxRect(self, line)
Returns the line client rectangle for the item checkbox image only.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: GetLineHeight(self, item=None)
Returns the line height for a specific item.
:param `item`: if not ``None``, an instance of :class:`UltimateListItem`.
.. method:: GetLineHighlightRect(self, line)
Returns the line client rectangle when the line is highlighted.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: GetLineIconRect(self, line)
Returns the line client rectangle for the item image only.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: GetLineLabelRect(self, line, col=0)
Returns the line client rectangle for the item text only.
Note this is the full column width unless an image or
checkbox exists. It is not the width of the text itself
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: GetLineRect(self, line)
Returns the line client rectangle.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: GetLineSize(self, line)
Returns the size of the total line client rectangle.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: GetLineY(self, line)
Returns the line `y` position.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: GetListCtrl(self)
Returns the parent widget, an instance of :class:`UltimateListCtrl`.
.. method:: GetMainWindowOfCompositeControl(self)
Returns the :class:`UltimateListMainWindow` parent.
.. method:: GetNextActiveItem(self, item, down=True)
Returns the next active item. Used Internally at present.
:param `item`: an instance of :class:`UltimateListItem`;
:param `down`: ``True`` to search downwards for an active item, ``False``
to search upwards.
.. method:: GetNextItem(self, item, geometry=ULC_NEXT_ALL, state=ULC_STATE_DONTCARE)
Searches for an item with the given `geometry` or `state`, starting from `item`
but excluding the `item` itself.
:param `item`: the item at which starting the search. If set to -1, the first
item that matches the specified flags will be returned.
:param `geometry`: can be one of:
=================== ========= =================================
Geometry Flag Hex Value Description
=================== ========= =================================
``ULC_NEXT_ABOVE`` 0x0 Searches for an item above the specified item
``ULC_NEXT_ALL`` 0x1 Searches for subsequent item by index
``ULC_NEXT_BELOW`` 0x2 Searches for an item below the specified item
``ULC_NEXT_LEFT`` 0x3 Searches for an item to the left of the specified item
``ULC_NEXT_RIGHT`` 0x4 Searches for an item to the right of the specified item
=================== ========= =================================
:param `state`: any combination of the following bits:
============================ ========= ==============================
State Bits Hex Value Description
============================ ========= ==============================
``ULC_STATE_DONTCARE`` 0x0 Don't care what the state is
``ULC_STATE_DROPHILITED`` 0x1 The item is highlighted to receive a drop event
``ULC_STATE_FOCUSED`` 0x2 The item has the focus
``ULC_STATE_SELECTED`` 0x4 The item is selected
``ULC_STATE_CUT`` 0x8 The item is in the cut state
``ULC_STATE_DISABLED`` 0x10 The item is disabled
``ULC_STATE_FILTERED`` 0x20 The item has been filtered
``ULC_STATE_INUSE`` 0x40 The item is in use
``ULC_STATE_PICKED`` 0x80 The item has been picked
``ULC_STATE_SOURCE`` 0x100 The item is a drag and drop source
============================ ========= ==============================
:return: The first item with given `state` following `item` or -1 if no such item found.
:note: This function may be used to find all selected items in the
control like this::
item = -1
while 1:
item = listctrl.GetNextItem(item, ULC_NEXT_ALL, ULC_STATE_SELECTED)
if item == -1:
break
# This item is selected - do whatever is needed with it
wx.LogMessage("Item %ld is selected."%item)
.. method:: GetRuleColour(self)
Returns the colour to be used for drawing the horizontal and vertical rules.
.. method:: GetSecondGradientColour(self)
Returns the second gradient colour for gradient-style selections.
.. method:: GetSelectedItemCount(self)
Returns the number of selected items in :class:`UltimateListCtrl`.
.. method:: GetSubItemRect(self, item, subItem)
Returns the rectangle representing the size and position, in physical coordinates,
of the given subitem, i.e. the part of the row `item` in the column `subItem`.
:param `item`: the row in which the item lives;
:param `subItem`: the column in which the item lives. If set equal to the special
value ``ULC_GETSUBITEMRECT_WHOLEITEM`` the return value is the same as for
:meth:`~UltimateListMainWindow.GetItemRect`.
:note: This method is only meaningful when the :class:`UltimateListCtrl` is in the
report mode.
.. method:: GetTextLength(self, s)
Returns the text width for the input string.
:param `s`: the string to measure.
.. method:: GetTotalWidth(self)
Returns the total width of the columns in :class:`UltimateListCtrl`.
.. method:: GetUserLineHeight(self)
Returns the custom value for the :class:`UltimateListMainWindow` item height, if previously set with
:meth:`~UltimateListMainWindow.SetUserLineHeight`.
:note: This method can be used only with ``ULC_REPORT`` and ``ULC_USER_ROW_HEIGHT`` styles set.
.. method:: GetViewRect(self)
Returns the rectangle taken by all items in the control. In other words,
if the controls client size were equal to the size of this rectangle, no
scrollbars would be needed and no free space would be left.
:note: This function only works in the icon and small icon views, not in
list or report views.
.. method:: GetVisibleLinesRange(self)
Returns the range of visible items on screen.
:note: This method can be used only if :class:`UltimateListCtrl` has the ``ULC_REPORT``
style set.
.. method:: GetWaterMark(self)
Returns the :class:`UltimateListCtrl` watermark image (if any), displayed in the
bottom right part of the window.
.. todo:: Better support for this is needed.
.. method:: HandleHyperLink(self, item)
Handles the hyperlink items, sending the ``EVT_LIST_ITEM_HYPERLINK`` event.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: HasAGWFlag(self, flag)
Returns ``True`` if the window has the given `flag` bit set.
:param `flag`: the bit to check.
:see: :meth:`UltimateListCtrl.SetSingleStyle() <UltimateListCtrl.SetSingleStyle>` for a list of valid flags.
.. method:: HasCurrent(self)
Returns ``True`` if the current item has been set, either programmatically
or by user intervention.
.. method:: HasFocus(self)
Returns ``True`` if the window has focus.
.. method:: HasFooter(self)
Returns ``True`` if the footer window is shown.
.. method:: HasHeader(self)
Returns ``True`` if the header window is shown.
.. method:: HideWindows(self)
Hides the windows associated to the items. Used internally.
.. method:: HighlightAll(self, on=True)
Highlights/unhighlights all the lines in :class:`UltimateListCtrl`.
:param `on`: ``True`` to highlight all the lines, ``False`` to unhighlight them.
.. method:: HighlightLine(self, line, highlight=True)
Highlights a line in :class:`UltimateListCtrl`.
:param `line`: an instance of :class:`UltimateListLineData`;
:param `highlight`: ``True`` to highlight the line, ``False`` otherwise.
.. method:: HighlightLines(self, lineFrom, lineTo, highlight=True)
Highlights a range of lines in :class:`UltimateListCtrl`.
:param `lineFrom`: an integer representing the first line to highlight;
:param `lineTo`: an integer representing the last line to highlight;
:param `highlight`: ``True`` to highlight the lines, ``False`` otherwise.
.. method:: HitTest(self, x, y)
HitTest method for a :class:`UltimateListCtrl`.
:param `x`: the mouse `x` position;
:param `y`: the mouse `y` position.
:see: :meth:`~UltimateListMainWindow.HitTestLine` for a list of return flags.
.. method:: HitTestLine(self, line, x, y)
HitTest method for a :class:`UltimateListCtrl` line.
:param `line`: an instance of :class:`UltimateListLineData`;
:param `x`: the mouse `x` position;
:param `y`: the mouse `y` position.
:return: a tuple of values, representing the item hit and a hit flag. The
hit flag can be one of the following bits:
=============================== ========= ================================
HitTest Flag Hex Value Description
=============================== ========= ================================
``ULC_HITTEST_ABOVE`` 0x1 Above the client area
``ULC_HITTEST_BELOW`` 0x2 Below the client area
``ULC_HITTEST_NOWHERE`` 0x4 In the client area but below the last item
``ULC_HITTEST_ONITEM`` 0x2a0 Anywhere on the item (text, icon, checkbox image)
``ULC_HITTEST_ONITEMICON`` 0x20 On the bitmap associated with an item
``ULC_HITTEST_ONITEMLABEL`` 0x80 On the label (string) associated with an item
``ULC_HITTEST_ONITEMRIGHT`` 0x100 In the area to the right of an item
``ULC_HITTEST_ONITEMSTATEICON`` 0x200 On the state icon for a list view item that is in a user-defined state
``ULC_HITTEST_TOLEFT`` 0x400 To the left of the client area
``ULC_HITTEST_TORIGHT`` 0x800 To the right of the client area
``ULC_HITTEST_ONITEMCHECK`` 0x1000 On the item checkbox (if any)
=============================== ========= ================================
.. method:: Init(self)
Initializes the :class:`UltimateListMainWindow` widget.
.. method:: InReportView(self)
Returns ``True`` if the window is in report mode.
.. method:: InsertColumn(self, col, item)
Inserts a column into :class:`UltimateListCtrl`.
:param `col`: the column index at which we wish to insert a new column;
:param `item`: an instance of :class:`UltimateListItem`.
:return: the index at which the column has been inserted.
:note: This method is meaningful only if :class:`UltimateListCtrl` has the ``ULC_REPORT``
or the ``ULC_TILE`` styles set.
.. method:: InsertItem(self, item)
Inserts an item into :class:`UltimateListCtrl`.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: InTileView(self)
Returns ``True`` if the window is in tile mode (partially implemented).
.. todo:: Fully implement tile view for :class:`UltimateListCtrl`.
.. method:: IsColumnShown(self, column)
Returns ``True`` if the input column is shown, ``False`` if it is hidden.
:param `column`: an integer specifying the column index.
.. method:: IsEmpty(self)
Returns ``True`` if the window has no items in it.
.. method:: IsHighlighted(self, line)
Returns ``True`` if the input line is highlighted.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: IsItemChecked(self, item)
Returns whether an item is checked or not.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: IsItemEnabled(self, item)
Returns whether an item is enabled or not.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: IsItemHyperText(self, item)
Returns whether an item is hypertext or not.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: IsSingleSel(self)
Returns ``True`` if we are in single selection mode, ``False`` if multi selection.
.. method:: IsVirtual(self)
Returns ``True`` if the window has the ``ULC_VIRTUAL`` style set.
.. method:: MoveToFocus(self)
Brings tyhe current item into view.
.. method:: MoveToItem(self, item)
Scrolls the input item into view.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: OnArrowChar(self, newCurrent, event)
Handles the keyboard arrows key events.
:param `newCurrent`: an integer specifying the new current item;
:param `event`: a :class:`KeyEvent` event to be processed.
.. method:: OnChar(self, event)
Handles the ``wx.EVT_CHAR`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`KeyEvent` event to be processed.
.. method:: OnChildFocus(self, event)
Handles the ``wx.EVT_CHILD_FOCUS`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`ChildFocusEvent` event to be processed.
.. note::
This method is intentionally empty to prevent the default handler in
:class:`ScrolledWindow` from needlessly scrolling the window when the edit
control is dismissed.
.. method:: OnCompareItems(self, line1, line2)
Returns whether 2 lines have the same index.
Override this function in the derived class to change the sort order of the items
in the :class:`UltimateListCtrl`. The function should return a negative, zero or positive
value if the first line is less than, equal to or greater than the second one.
:param `line1`: an instance of :class:`UltimateListItem`;
:param `line2`: another instance of :class:`UltimateListItem`.
:note: The base class version compares lines by their index.
.. method:: OnEraseBackground(self, event)
Handles the ``wx.EVT_ERASE_BACKGROUND`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`EraseEvent` event to be processed.
:note: This method is intentionally empty to reduce flicker.
.. method:: OnHoverTimer(self, event)
Handles the ``wx.EVT_TIMER`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`TimerEvent` event to be processed.
.. method:: OnKeyDown(self, event)
Handles the ``wx.EVT_KEY_DOWN`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`KeyEvent` event to be processed.
.. method:: OnKeyUp(self, event)
Handles the ``wx.EVT_KEY_UP`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`KeyEvent` event to be processed.
.. method:: OnKillFocus(self, event)
Handles the ``wx.EVT_KILL_FOCUS`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`FocusEvent` event to be processed.
.. method:: OnMouse(self, event)
Handles the ``wx.EVT_MOUSE_EVENTS`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`MouseEvent` event to be processed.
.. method:: OnPaint(self, event)
Handles the ``wx.EVT_PAINT`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`PaintEvent` event to be processed.
.. method:: OnRenameAccept(self, itemEdit, value)
Called by :class:`UltimateListTextCtrl`, to accept the changes and to send the
``EVT_LIST_END_LABEL_EDIT`` event.
:param `itemEdit`: an instance of :class:`UltimateListItem`;
:param `value`: the new value of the item label.
.. method:: OnRenameCancelled(self, itemEdit)
Called by :class:`UltimateListTextCtrl`, to cancel the changes and to send the
``EVT_LIST_END_LABEL_EDIT`` event.
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: OnRenameTimer(self)
The timer for renaming has expired. Start editing.
.. method:: OnScroll(self, event)
Handles the ``wx.EVT_SCROLLWIN`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`ScrollEvent` event to be processed.
.. method:: OnSetFocus(self, event)
Handles the ``wx.EVT_SET_FOCUS`` event for :class:`UltimateListMainWindow`.
:param `event`: a :class:`FocusEvent` event to be processed.
.. method:: PaintWaterMark(self, dc)
Draws a watermark at the bottom right of :class:`UltimateListCtrl`.
:param `dc`: an instance of :class:`wx.DC`.
.. todo:: Better support for this is needed.
.. method:: RecalculatePositions(self, noRefresh=False)
Recalculates all the items positions, and sets the scrollbars positions
too.
:param `noRefresh`: ``True`` to avoid calling `Refresh`, ``False`` otherwise.
.. method:: RefreshAfter(self, lineFrom)
Redraws all the lines after the input one.
:param `lineFrom`: an integer representing the first line to refresh.
.. method:: RefreshAll(self)
Refreshes the entire :class:`UltimateListCtrl`.
.. method:: RefreshLine(self, line)
Redraws the input line.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: RefreshLines(self, lineFrom, lineTo)
Redraws a range of lines in :class:`UltimateListCtrl`.
:param `lineFrom`: an integer representing the first line to refresh;
:param `lineTo`: an integer representing the last line to refresh.
.. method:: RefreshSelected(self)
Redraws the selected lines.
.. method:: ResetCurrent(self)
Resets the current item to ``None``.
.. method:: ResetLineDimensions(self, force=False)
Resets the line dimensions, so that client rectangles and positions are
recalculated.
:param `force`: ``True`` to reset all line dimensions.
.. method:: ResetTextControl(self)
Called by :class:`UltimateListTextCtrl` when it marks itself for deletion.
.. method:: ResetVisibleLinesRange(self, reset=False)
Forces us to recalculate the range of visible lines.
:param `reset`: ``True`` to reset all line dimensions, which will then be
recalculated.
.. method:: ResizeColumns(self)
If ``ULC_AUTOSIZE_FILL`` was passed to :meth:`UltimateListCtrl.SetColumnWidth() <UltimateListCtrl.SetColumnWidth>` then
that column's width will be expanded to fill the window on a resize event.
Called by :meth:`UltimateListCtrl.OnSize() <UltimateListCtrl.OnSize>` when the window is resized.
.. method:: ReverseHighlight(self, line)
Toggles the line state and refreshes it.
:param `line`: an instance of :class:`UltimateListLineData`.
.. method:: ScrollList(self, dx, dy)
Scrolls the :class:`UltimateListCtrl`.
:param `dx`: if in icon, small icon or report view mode, specifies the number
of pixels to scroll. If in list view mode, `dx` specifies the number of
columns to scroll.
:param `dy`: always specifies the number of pixels to scroll vertically.
.. method:: SendNotify(self, line, command, point=wx.DefaultPosition)
Actually sends a :class:`UltimateListEvent`.
:param `line`: an instance of :class:`UltimateListLineData`;
:param `command`: the event type to send;
:param `point`: an instance of :class:`wx.Point`.
.. method:: SetBackgroundImage(self, image)
Sets the :class:`UltimateListCtrl` background image.
:param `image`: if not ``None``, an instance of :class:`wx.Bitmap`.
:note: At present, the background image can only be used in "tile" mode.
.. todo:: Support background images also in stretch and centered modes.
.. method:: SetColumn(self, col, item)
Sets information about this column.
:param `col`: an integer specifying the column index;
:param `item`: an instance of :class:`UltimateListItem`.
.. method:: SetColumnCustomRenderer(self, col=0, renderer=None)
Associate a custom renderer to this column's header
:param `col`: the column index.
:param `renderer`: a class able to correctly render the input item.
:note: the renderer class **must** implement the methods `DrawHeaderButton`
and `GetForegroundColor`.
.. method:: SetColumnWidth(self, col, width)
Sets the column width.
:param `width`: can be a width in pixels or ``wx.LIST_AUTOSIZE`` (-1) or
``wx.LIST_AUTOSIZE_USEHEADER`` (-2) or ``ULC_AUTOSIZE_FILL`` (-3).
``wx.LIST_AUTOSIZE`` will resize the column to the length of its longest
item. ``wx.LIST_AUTOSIZE_USEHEADER`` will resize the column to the
length of the header (Win32) or 80 pixels (other platforms).
``ULC_AUTOSIZE_FILL`` will resize the column fill the remaining width
of the window.
:note: In small or normal icon view, col must be -1, and the column width
is set for all columns.
.. method:: SetDisabledTextColour(self, colour)
Sets the items disabled colour.
:param `colour`: an instance of :class:`wx.Colour`.
.. method:: SetFirstGradientColour(self, colour=None)
Sets the first gradient colour for gradient-style selections.
:param `colour`: if not ``None``, a valid :class:`wx.Colour` instance. Otherwise,
the colour is taken from the system value ``wx.SYS_COLOUR_HIGHLIGHT``.
.. method:: SetFont(self, font)
Overridden base class virtual to reset the line height when the font changes.
:param `font`: a valid :class:`wx.Font` object.
:note: Overridden from :class:`ScrolledWindow`.
.. method:: SetGradientStyle(self, vertical=0)
Sets the gradient style for gradient-style selections.
:param `vertical`: 0 for horizontal gradient-style selections, 1 for vertical
gradient-style selections.
.. method:: SetHyperTextFont(self, font)
Sets the font used to render hypertext items.
:param `font`: a valid :class:`wx.Font` instance.
.. method:: SetHyperTextNewColour(self, colour)
Sets the colour used to render a non-visited hypertext item.
:param `colour`: a valid :class:`wx.Colour` instance.
.. method:: SetHyperTextVisitedColour(self, colour)
Sets the colour used to render a visited hypertext item.
:param `colour`: a valid :class:`wx.Colour` instance.
.. method:: SetImageList(self, imageList, which)
Sets the image list associated with the control.
:param `imageList`: an instance of :class:`wx.ImageList` or an instance of :class:`PyImageList`;
:param `which`: one of ``wx.IMAGE_LIST_NORMAL``, ``wx.IMAGE_LIST_SMALL``,
``wx.IMAGE_LIST_STATE`` (the last is unimplemented).
:note: Using :class:`PyImageList` enables you to have images of different size inside the
image list. In your derived class, instead of doing this::
imageList = wx.ImageList(16, 16)
imageList.Add(someBitmap)
self.SetImageList(imageList, wx.IMAGE_LIST_SMALL)
You should do this::
imageList = PyImageList(16, 16)
imageList.Add(someBitmap)
self.SetImageList(imageList, wx.IMAGE_LIST_SMALL)
.. method:: SetImageListCheck(self, sizex, sizey, imglist=None)
Sets the checkbox/radiobutton image list.
:param `sizex`: the width of the bitmaps in the `imglist`;
:param `sizey`: the height of the bitmaps in the `imglist`;
:param `imglist`: an instance of :class:`wx.ImageList`.
.. method:: SetItem(self, item)
Sets information about the item.
:param `item`: an instance of :class:`UltimateListItemData`.
.. method:: SetItemCount(self, count)
This method can only be used with virtual :class:`UltimateListCtrl`. It is used to
indicate to the control the number of items it contains. After calling it,
the main program should be ready to handle calls to various item callbacks
(such as :meth:`UltimateListCtrl.OnGetItemText() <UltimateListCtrl.OnGetItemText>`) for all items in the range from 0 to `count`.
:param `count`: the total number of items in :class:`UltimateListCtrl`.
.. method:: SetItemCustomRenderer(self, item, renderer=None)
Associate a custom renderer to this item.
:param `item`: an instance of :class:`UltimateListItem`;
:param `renderer`: a class able to correctly render the item.
:note: the renderer class **must** implement the methods `DrawSubItem`,
`GetLineHeight` and `GetSubItemWidth`.
.. method:: SetItemHyperText(self, item, hyper=True)
Sets whether the item is hypertext or not.
:param `item`: an instance of :class:`UltimateListItem`;
:param `hyper`: ``True`` to have an item with hypertext behaviour, ``False`` otherwise.
.. method:: SetItemKind(self, item, kind)
Sets the item kind.
:param `item`: an instance of :class:`UltimateListItem`;
:param `kind`: may be one of the following integers:
=============== ==========================
Item Kind Description
=============== ==========================
0 A normal item
1 A checkbox-like item
2 A radiobutton-type item
=============== ==========================
.. method:: SetItemOverFlow(self, item, over=True)
Sets the item in the overflow/non overflow state.
An item/subitem may overwrite neighboring items/subitems if its text would
not normally fit in the space allotted to it.
:param `item`: an instance of :class:`UltimateListItem`;
:param `over`: ``True`` to set the item in a overflow state, ``False`` otherwise.
.. method:: SetItemSpacing(self, spacing, isSmall=False)
Sets the spacing between item texts and icons.
:param `spacing`: the spacing between item texts and icons, in pixels;
:param `isSmall`: ``True`` if using a ``wx.IMAGE_LIST_SMALL`` image list,
``False`` if using a ``wx.IMAGE_LIST_NORMAL`` image list.
.. method:: SetItemState(self, litem, state, stateMask)
Sets the item state flags for the input item.
:param `litem`: the index of the item; if defaulted to -1, the state flag
will be set for all the items;
:param `state`: the item state flag;
:param `stateMask`: the bitmask for the state flag.
:see: :meth:`~UltimateListMainWindow.SetItemStateAll` for a list of valid state flags.
.. method:: SetItemStateAll(self, state, stateMask)
Sets the item state flags for all the items.
:param `state`: any combination of the following bits:
============================ ========= ==============================
State Bits Hex Value Description
============================ ========= ==============================
``ULC_STATE_DONTCARE`` 0x0 Don't care what the state is
``ULC_STATE_DROPHILITED`` 0x1 The item is highlighted to receive a drop event
``ULC_STATE_FOCUSED`` 0x2 The item has the focus
``ULC_STATE_SELECTED`` 0x4 The item is selected
``ULC_STATE_CUT`` 0x8 The item is in the cut state
``ULC_STATE_DISABLED`` 0x10 The item is disabled
``ULC_STATE_FILTERED`` 0x20 The item has been filtered
``ULC_STATE_INUSE`` 0x40 The item is in use
``ULC_STATE_PICKED`` 0x80 The item has been picked
``ULC_STATE_SOURCE`` 0x100 The item is a drag and drop source
============================ ========= ==============================
:param `stateMask`: the bitmask for the state flag.
:note: The valid state flags are influenced by the value of the state mask.
.. method:: SetItemText(self, item, value)
Sets the item text.
:param `item`: an instance of :class:`UltimateListItem`;
:param `value`: the new item text.
.. method:: SetItemVisited(self, item, visited=True)
Sets whether an hypertext item was visited.
:param `item`: an instance of :class:`UltimateListItem`;
:param `visited`: ``True`` to mark an hypertext item as visited, ``False`` otherwise.
.. method:: SetItemWindow(self, item, wnd, expand=False)
Sets the window for the given item.
:param `item`: an instance of :class:`UltimateListItem`;
:param `wnd`: if not ``None``, a non-toplevel window to be displayed next to
the item;
:param `expand`: ``True`` to expand the column where the item/subitem lives,
so that the window will be fully visible.
.. method:: SetItemWindowEnabled(self, item, enable=True)
Enables/disables the window associated to the item.
:param `item`: an instance of :class:`UltimateListItem`;
:param `enable`: ``True`` to enable the associated window, ``False`` to
disable it.
.. method:: SetReportView(self, inReportView)
Sets whether :class:`UltimateListCtrl` is in report view or not.
:param `inReportView`: ``True`` to set :class:`UltimateListCtrl` in report view, ``False``
otherwise.
.. method:: SetSecondGradientColour(self, colour=None)
Sets the second gradient colour for gradient-style selections.
:param `colour`: if not ``None``, a valid :class:`wx.Colour` instance. Otherwise,
the colour generated is a slightly darker version of the :class:`UltimateListCtrl`
background colour.
.. method:: SetUserLineHeight(self, height)
Sets a custom value for the :class:`UltimateListMainWindow` item height.
:param `height`: the custom height for all the items, in pixels.
:note: This method can be used only with ``ULC_REPORT`` and ``ULC_USER_ROW_HEIGHT`` styles set.
.. method:: SetWaterMark(self, watermark)
Sets the :class:`UltimateListCtrl` watermark image to be displayed in the bottom
right part of the window.
:param `watermark`: if not ``None``, an instance of :class:`wx.Bitmap`.
.. todo:: Better support for this is needed.
.. method:: SortItems(self, func)
Call this function to sort the items in the :class:`UltimateListCtrl`. Sorting is done
using the specified function `func`. This function must have the
following prototype::
def OnCompareItems(self, line1, line2):
DoSomething(line1, line2)
# function code
It is called each time when the two items must be compared and should return 0
if the items are equal, negative value if the first item is less than the second
one and positive value if the first one is greater than the second one.
:param `func`: the method to use to sort the items. The default is to use the
:meth:`~UltimateListMainWindow.OnCompareItems` method.
.. method:: TileBackground(self, dc)
Tiles the background image to fill all the available area.
:param `dc`: an instance of :class:`wx.DC`.
.. todo:: Support background images also in stretch and centered modes.
.. method:: UpdateCurrent(self)
Updates the current line selection.
|