Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | * doc/*.html: Updated to reflect the changes; improved and extended the description of the "-height" option in the reference manual; added references to the new Scrollutil package and an example showing how the scrollutil::scrollarea widget can be used to make the creation of a scrolled tablelist quite simple. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
deffd2c56399fff24d7fd3ab683b337b |
User & Date: | csaba 2019-07-06 17:47:30.084 |
Context
2019-07-06
| ||
17:50 | * doc/adwaita.png: Updated screenshots. * doc/arrowStyles_vista.png: check-in: 4713178d5f user: csaba tags: trunk | |
17:47 | * doc/*.html: Updated to reflect the changes; improved and extended the description of the "-height" option in the reference manual; added references to the new Scrollutil package and an example showing how the scrollutil::scrollarea widget can be used to make the creation of a scrolled tablelist quite simple. check-in: deffd2c563 user: csaba tags: trunk | |
17:46 | * scripts/tclIndex: Newly generated. check-in: ed5bcd155e user: csaba tags: trunk | |
Changes
Changes to modules/tablelist/doc/index.html.
1 2 | <html> <head> | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <html> <head> <title>The Multi-Column Listbox and Tree Widget Package Tablelist 6.6</title> <meta name="Author" content="Csaba Nemethi"> <meta name="Keywords" content= "tablelist, multi-column, listbox, tree, widget, tile"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>The Multi-Column Listbox and Tree Widget Package Tablelist 6.6</h1> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelist.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Tablelist Programmer's Guide</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Tablelist Programmer's Guide</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
48 49 50 51 52 53 54 | Configuration Options</a></li> <li><a href="#ex_browse">Two Widget Browsers Based on a tablelist</a></li> <li><a href="#ex_dirViewer">A Directory Viewer Based on a tablelist</a></li> | | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | Configuration Options</a></li> <li><a href="#ex_browse">Two Widget Browsers Based on a tablelist</a></li> <li><a href="#ex_dirViewer">A Directory Viewer Based on a tablelist</a></li> <li><a href="#ex_styles">Improving the Look & Feel of a tablelist Widget</a></li> <li><a href="#ex_editing">Advanced Interactive tablelist Cell Editing</a></li> <li><a href="#ex_windows">A tablelist Widget Containing Embedded Windows</a></li> |
︙ | ︙ | |||
122 123 124 125 126 127 128 | of the global and column-specific options refer to the header titles, implemented as label widgets. For instance, the <code>-labelcommand</code> option specifies a Tcl command to be invoked when mouse button 1 is released over a header label. The most common value of this option sorts the items based on the respective column.</p> <p>The Tablelist package provides a great variety of tree styles controlling | | | | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | of the global and column-specific options refer to the header titles, implemented as label widgets. For instance, the <code>-labelcommand</code> option specifies a Tcl command to be invoked when mouse button 1 is released over a header label. The most common value of this option sorts the items based on the respective column.</p> <p>The Tablelist package provides a great variety of tree styles controlling the look & feel of the column that displays the tree hierarchy with the aid of indentations and expand/collapse controls.</p> <p>Interactive editing of the elements of a tablelist widget can be enabled for individual cells and for entire columns. A great variety of widgets from the Tk core and from the packages tile, BWidget, Iwidgets, combobox, ctext, and Mentry (or Mentry_tile) is supported for being used as embedded edit window. In addition, a rich set of keyboard bindings is provided for a comfortable navigation between the editable cells.</p> |
︙ | ︙ | |||
166 167 168 169 170 171 172 | <a href="http://www.nemethi.de">http://www.nemethi.de</a> </address> </blockquote> <h3 id="ov_get">How to Get It?</h3> <p>Tablelist is available for free download from the same URL as Wcb. | | | | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | <a href="http://www.nemethi.de">http://www.nemethi.de</a> </address> </blockquote> <h3 id="ov_get">How to Get It?</h3> <p>Tablelist is available for free download from the same URL as Wcb. The distribution file is <code>tablelist6.6.tar.gz</code> for UNIX and <code>tablelist6_6.zip</code> for Windows. These files contain the same information, except for the additional carriage return character preceding the linefeed at the end of each line in the text files for Windows.</p> <p>Tablelist is also included in tklib, which has the address</p> <blockquote> <address> |
︙ | ︙ | |||
190 191 192 193 194 195 196 | a directory at the same level as the Tcl and Tk script libraries. The locations of these library directories are given by the <code>tcl_library</code> and <code>tk_library</code> variables, respectively.</p> <p>To install Tablelist <i>on UNIX</i>, <code>cd</code> to the desired directory and unpack the distribution file | | | | | | | | 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 | a directory at the same level as the Tcl and Tk script libraries. The locations of these library directories are given by the <code>tcl_library</code> and <code>tk_library</code> variables, respectively.</p> <p>To install Tablelist <i>on UNIX</i>, <code>cd</code> to the desired directory and unpack the distribution file <code>tablelist6.6.tar.gz</code>:</p> <blockquote> <pre> gunzip -c tablelist6.6.tar.gz | tar -xf - </pre> </blockquote> <p>On most UNIX systems this can be replaced with</p> <blockquote> <pre> tar -zxf tablelist6.6.tar.gz </pre> </blockquote> <p>Both commands will create a directory named <code>tablelist6.6</code>, with the subdirectories <code>demos</code>, <code>doc</code>, and <code>scripts</code>.</p> <p><i>On Windows</i>, use WinZip or some other program capable of unpacking the distribution file <code>tablelist6_6.zip</code> into the directory <code>tablelist6.6</code>, with the subdirectories <code>demos</code>, <code>doc</code>, and <code>scripts</code>.</p> <p>The file <code>tablelistEdit.tcl</code> in the <code>scripts</code> directory is only needed for applications making use of interactive cell editing. Similarly, the file <code>tablelistMove.tcl</code> in the same directory is only required for scripts invoking the <code>move</code> or <code>movecolumn</code> command. Finally, the file |
︙ | ︙ | |||
309 310 311 312 313 314 315 | name per package.</p> <p>Please note that <b>ActiveTcl versions 8.5 and later use a modified package mechanism, which only exports the all-lowercase names <code>tablelist</code> and <code>tablelist_tile</code></b>.</p> <p><b>REMARK:</b> If you have an earlier Tablelist version as part of | | | | | | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | name per package.</p> <p>Please note that <b>ActiveTcl versions 8.5 and later use a modified package mechanism, which only exports the all-lowercase names <code>tablelist</code> and <code>tablelist_tile</code></b>.</p> <p><b>REMARK:</b> If you have an earlier Tablelist version as part of ActiveTcl 8.5 or above and the new Tablelist release 6.6, then it is highly recommended to specify the version number <code>6.6</code> in the <code>package require</code> command, because otherwise the interpreter will load the old Tablelist version included in ActiveTcl as Tcl Module. The <a href="#examples">examples</a> below use the statement <code>package require tablelist 6.6</code>, and their tile-based counterparts invoke the command <code>package require tablelist_tile 6.6</code>.</p> <p>Since the packages Tablelist and Tablelist_tile are implemented in the <code>tablelist</code> namespace, you must either invoke the</p> <blockquote> <pre> namespace import tablelist::<i>pattern</i> ?tablelist::<i>pattern ...</i>? |
︙ | ︙ | |||
502 503 504 505 506 507 508 | the <code>tablelist::library</code> variable to find the location of the file. For example, assuming that your Tablelist installation has the directory structure described in the <a href="#ov_install">How to install it?</a> section, the required commands are: <blockquote> <pre> | | | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | the <code>tablelist::library</code> variable to find the location of the file. For example, assuming that your Tablelist installation has the directory structure described in the <a href="#ov_install">How to install it?</a> section, the required commands are: <blockquote> <pre> package require tablelist 6.6 source [file join $tablelist::library demos config.tcl] </pre> </blockquote> </li> </ul> <p>In both cases, the script will print the following message to |
︙ | ︙ | |||
558 559 560 561 562 563 564 | known from the standard Tk widgets. The <code>demo::displayConfig</code> procedure inserts the items of this list into a scrolled tablelist with 5 dynamic-width columns and interactive sort capability, and returns the name of the newly created tablelist widget:</p> <blockquote> <pre> | | | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | known from the standard Tk widgets. The <code>demo::displayConfig</code> procedure inserts the items of this list into a scrolled tablelist with 5 dynamic-width columns and interactive sort capability, and returns the name of the newly created tablelist widget:</p> <blockquote> <pre> package require tablelist 6.6 namespace eval demo { # # Get the current windowing system ("x11", "win32", "classic", or "aqua") # and add some entries to the Tk option database for the following # widget hierarchy within a toplevel widget of the class DemoTop: # |
︙ | ︙ | |||
785 786 787 788 789 790 791 | <p>The option database entries for <code>*DemoTop.tf.borderWidth</code>, <code>*DemoTop.tf.relief</code>, <code>*DemoTop.tf.tbl.borderWidth</code>, and <code>*DemoTop.tf.tbl.highlightThickness</code> are implicitly used when managing the tablelist widget and the two scrollbars with the aid of <code>grid</code>. Notice how the <code><a href= "tablelistWidget.html#cornerpath">cornerpath</a></code> subcommand enables us | | | | | 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | <p>The option database entries for <code>*DemoTop.tf.borderWidth</code>, <code>*DemoTop.tf.relief</code>, <code>*DemoTop.tf.tbl.borderWidth</code>, and <code>*DemoTop.tf.tbl.highlightThickness</code> are implicitly used when managing the tablelist widget and the two scrollbars with the aid of <code>grid</code>. Notice how the <code><a href= "tablelistWidget.html#cornerpath">cornerpath</a></code> subcommand enables us to achieve a native look & feel with respect to the vertical scrollbar on the windowing systems other than <code>win32</code> (i.e., <code>aqua</code> and <code>x11</code>).</p> <p>We populate the tablelist by invoking the <code>demo::putConfig</code> procedure discussed below. The same script is associated with the <b>Refresh</b> button, as the value of its <code>-command</code> configuration option. This procedure is implemented as follows:</p> <blockquote> |
︙ | ︙ | |||
1039 1040 1041 1042 1043 1044 1045 | <code>browseTree.tcl</code>. We will restrict the description below to the second one, which requires Tk 8.3 or later, due to the use of several tree-related tablelist options and subcommands.</p> <blockquote> <pre> package require Tk 8.3 | | | 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | <code>browseTree.tcl</code>. We will restrict the description below to the second one, which requires Tk 8.3 or later, due to the use of several tree-related tablelist options and subcommands.</p> <blockquote> <pre> package require Tk 8.3 package require tablelist 6.6 namespace eval demo { variable dir [file dirname [info script]] # # Create two images, needed in the procedure putChildren # |
︙ | ︙ | |||
1637 1638 1639 1640 1641 1642 1643 | in the <a href="#ex_browse">previous section</a>. In the following we will only present a few procedures that invoke tablelist commands not encountered in the examples above:</p> <blockquote> <pre> package require Tk 8.3 | | | 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 | in the <a href="#ex_browse">previous section</a>. In the following we will only present a few procedures that invoke tablelist commands not encountered in the examples above:</p> <blockquote> <pre> package require Tk 8.3 package require tablelist 6.6 # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option.tcl] |
︙ | ︙ | |||
1698 1699 1700 1701 1702 1703 1704 | </pre> </blockquote> <p>The procedure <code>displayContents</code> creates the tablelist widget and the two scrollbars as children of a frame of class <code>ScrollArea</code>. For this class, the file <code>option.tcl</code>, <code>source</code>d into the main script, contains | | | 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 | </pre> </blockquote> <p>The procedure <code>displayContents</code> creates the tablelist widget and the two scrollbars as children of a frame of class <code>ScrollArea</code>. For this class, the file <code>option.tcl</code>, <code>source</code>d into the main script, contains some look & feel related settings similar to the ones encountered in our <a href="#ex_config">first example</a>:</p> <blockquote> <pre> option add *ScrollArea.borderWidth 1 option add *ScrollArea.relief sunken option add *ScrollArea.Tablelist.borderWidth 0 |
︙ | ︙ | |||
1748 1749 1750 1751 1752 1753 1754 | } else { set row [expr {$nodeIdx + 1}] } # # Build a list from the data of the subdirectories and # files of the directory dir. Prepend a "D" or "F" to | | | 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 | } else { set row [expr {$nodeIdx + 1}] } # # Build a list from the data of the subdirectories and # files of the directory dir. Prepend a "D" or "F" to # each entry's name and modification date & time, for # sorting purposes (it will be removed by formatString). # set itemList {} if {[string compare $dir ""] == 0} { foreach volume [file volumes] { lappend itemList [list D[file nativename $volume] -1 D $volume] } |
︙ | ︙ | |||
1793 1794 1795 1796 1797 1798 1799 | } else { ;# directory $tbl cellconfigure $row,0 -image clsdFolderImg $tbl rowattrib $row pathName $name # # Mark the row as collapsed if the directory is non-empty # | | | 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 | } else { ;# directory $tbl cellconfigure $row,0 -image clsdFolderImg $tbl rowattrib $row pathName $name # # Mark the row as collapsed if the directory is non-empty # if {[file readable $name] && [llength \ [glob -nocomplain -types {d f} -directory $name *]] != 0} { $tbl collapse $row } } incr row } |
︙ | ︙ | |||
1918 1919 1920 1921 1922 1923 1924 | </pre> </blockquote> <p>The last line of the script invokes the procedure <code>displayContents</code> with an empty string as argument, i.e., displays the volumes mounted on the system.</p> | | | 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 | </pre> </blockquote> <p>The last line of the script invokes the procedure <code>displayContents</code> with an empty string as argument, i.e., displays the volumes mounted on the system.</p> <h3 id="ex_styles">Improving the Look & Feel of a tablelist Widget</h3> <p>The script <code>styles.tcl</code> in the <code>demos</code> directory demonstrates some ways of making tablelist widgets smarter and improving the readability of their items. It creates 8 tablelist widgets, shown in the following figure:</p> <blockquote> |
︙ | ︙ | |||
2025 2026 2027 2028 2029 2030 2031 | <code>miscWidgets.tcl</code> are similar). A few parts of the code are shown in <span>red</span> color – we will return to this towards the end of the section.</p> <blockquote> <pre> package require Tk 8.4 ;# because of "-compound" | | | 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 | <code>miscWidgets.tcl</code> are similar). A few parts of the code are shown in <span>red</span> color – we will return to this towards the end of the section.</p> <blockquote> <pre> package require Tk 8.4 ;# because of "-compound" package require tablelist 6.6 package require BWidget wm title . "Serial Line Configuration" # # Add some entries to the Tk option database # |
︙ | ︙ | |||
2095 2096 2097 2098 2099 2100 2101 | proc emptyStr val { return "" } proc formatDate val { return [clock format $val -format "%Y-%m-%d"] } proc formatTime val { return [clock format $val -format "%H:%M:%S"] } # # Populate the tablelist widget; set the activation | | | 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 | proc emptyStr val { return "" } proc formatDate val { return [clock format $val -format "%Y-%m-%d"] } proc formatTime val { return [clock format $val -format "%H:%M:%S"] } # # Populate the tablelist widget; set the activation # date & time to 10 minutes past the current clock value # set clock [expr {[clock seconds] + 600}] for {set i 0; set n 1} {$i < 16} {set i $n; incr n} { $tbl insert end [list $n [expr {$i < 8}] "Line $n" 9600 8 None 1 XON/XOFF \ $clock $clock [lindex $colorNames $i]] <span>set availImg [expr {($i < 8) ? "checkedImg" : "uncheckedImg"}] |
︙ | ︙ | |||
2206 2207 2208 2209 2210 2211 2212 | # # Populate the ComboBox and allow no more # than 6 digits in its Entry component # $w configure -values {50 75 110 300 1200 2400 4800 9600 19200 38400 57600 115200 230400 460800 921600} $w configure -invalidcommand bell -validate key -validatecommand \ | | | 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 | # # Populate the ComboBox and allow no more # than 6 digits in its Entry component # $w configure -values {50 75 110 300 1200 2400 4800 9600 19200 38400 57600 115200 230400 460800 921600} $w configure -invalidcommand bell -validate key -validatecommand \ {expr {[string length %P] <= 6 && [regexp {^[0-9]*$} %S]}} } dataBits { # # Configure the SpinBox # $w configure -range {5 8 1} -editable no |
︙ | ︙ | |||
2305 2306 2307 2308 2309 2310 2311 | # "actDate" and "actTime" will have the same internal value # set actTime [$tbl cellcget $row,actTime -text] set actClock [clock scan [formatTime $actTime] -base $actDate] if {$actClock <= [clock seconds]} { bell tk_messageBox -title "Error" -icon error -message \ | | | 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 | # "actDate" and "actTime" will have the same internal value # set actTime [$tbl cellcget $row,actTime -text] set actClock [clock scan [formatTime $actTime] -base $actDate] if {$actClock <= [clock seconds]} { bell tk_messageBox -title "Error" -icon error -message \ "The activation date & time must be in the future" $tbl rejectinput } else { $tbl cellconfigure $row,actTime -text $actClock return $actClock } } |
︙ | ︙ | |||
2389 2390 2391 2392 2393 2394 2395 | "310"> </blockquote> <p>First, we create and populate the tablelist widget:</p> <blockquote> <pre> | | | 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 | "310"> </blockquote> <p>First, we create and populate the tablelist widget:</p> <blockquote> <pre> package require tablelist 6.6 wm title . "Tk Library Scripts" # # Add some entries to the Tk option database # set dir [file dirname [info script]] |
︙ | ︙ | |||
2647 2648 2649 2650 2651 2652 2653 | <span>red</span> color:</p> <p>First, we replace the starting lines</p> <blockquote> <pre> package require Tk 8.3 ;# because of entry validation | | | | 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 | <span>red</span> color:</p> <p>First, we replace the starting lines</p> <blockquote> <pre> package require Tk 8.3 ;# because of entry validation package require tablelist 6.6 </pre> </blockquote> <p>with</p> <blockquote> <pre> package require tablelist<span>_tile</span> 6.6 </pre> </blockquote> <p>and the command</p> <blockquote> <pre> |
︙ | ︙ | |||
2755 2756 2757 2758 2759 2760 2761 | } option add *selectBorderWidth $tablelist::themeDefaults(-selectborderwidth)</span> </pre> </blockquote> <p>The demo script <code>tileWidgets.tcl</code> uses not only the Tablelist_tile package for creating a tablelist widget with a modern | | | 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 | } option add *selectBorderWidth $tablelist::themeDefaults(-selectborderwidth)</span> </pre> </blockquote> <p>The demo script <code>tileWidgets.tcl</code> uses not only the Tablelist_tile package for creating a tablelist widget with a modern theme-specific look & feel, but also the tile entry, spinbox, combobox, checkbutton, and menubutoon widgets for interactive cell editing. The resulting window has a nice theme-specific appearance:</p> <blockquote> <img src="tileWidgets.png" alt="Serial Line Configuration" width="839" height="404"> </blockquote> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistBWidget.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the BWidget Package</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the BWidget Package</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistBinding.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Commands Related to Binding Scripts</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Commands Related to Binding Scripts</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistColSort.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Commands for Interactive Sorting by One or More Columns</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Commands for Interactive Sorting by One or More Columns</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistCombobox.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the combobox Package</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the combobox Package</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistCtext.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the ctext Package</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the ctext Package</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistIwidgets.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the Iwidgets Package</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the Iwidgets Package</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistMentry.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the Mentry Package</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using the Mentry Package</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
256 257 258 259 260 261 262 | <code><b>mentry::dateTimeMentry</b></code> command from the Mentry (or Mentry_tile) package for interactive cell editing in tablelist widgets. The <code><i>format</i></code>, <code><i>dateSeparator</i></code>, and <code><i>timeSeparator</i></code> arguments have the same meanings as in the <code><b>mentry::dateTimeMentry</b></code> command. If the <code><b>-gmt</b></code> argument is present then both the internal clock | | | | | | | | 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 | <code><b>mentry::dateTimeMentry</b></code> command from the Mentry (or Mentry_tile) package for interactive cell editing in tablelist widgets. The <code><i>format</i></code>, <code><i>dateSeparator</i></code>, and <code><i>timeSeparator</i></code> arguments have the same meanings as in the <code><b>mentry::dateTimeMentry</b></code> command. If the <code><b>-gmt</b></code> argument is present then both the internal clock value and its external date & time representation in the mentry widget will be viewed as Greenwich Mean Time, otherwise as local time. The second optional argument specifies the name to be used for the mentry widget as the value of the <code><b><a href= "tablelistWidget.html#col_editwindow">-editwindow</a></b></code> column or cell configuration option. It may be any string that is different from the <a href="tablelistTkCore.html">Tk core</a> and <a href= "tablelistTile.html">tile</a> edit window names. The default is <code><b>dateTimeMentry</b></code>. The command returns its <code><i>name</i></code> argument.</dd> <dd class="tm">A tablelist column having the above <code><i>name</i></code> as the value of its <code><b>-editwindow</b></code> option must contain as internal cell values date & time information in seconds (displayed with the aid of a command given by the <code><b><a href= "tablelistWidget.html#col_formatcommand">-formatcommand</a></b></code> column configuration option). The <code><b><a href= "tablelistWidget.html#finishediting">finishediting</a></b></code> subcommand of the Tcl command associated with the tablelist widget will retrieve the content of the embedded window used for interactive cell editing by invoking the <code><b>mentry::getClockVal</b></code> command. The value returned by this command (a clock value in seconds |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistThemes.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Commands Related to Tile Themes</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Commands Related to Tile Themes</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistTile.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using Tile Widgets</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using Tile Widgets</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistTkCore.html.
︙ | ︙ | |||
8 9 10 11 12 13 14 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using Tk Core Widgets</h1> | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>Interactive Tablelist Cell Editing Using Tk Core Widgets</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistWidget.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>The <code><b>tablelist::tablelist</b></code> Command</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#FFFFFF"> <div align="center"> <h1>The <code><b>tablelist::tablelist</b></code> Command</h1> <h2>For Tablelist Version 6.6</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
141 142 143 144 145 146 147 | <dd><code><b><a href="#forceeditendcommand">-forceeditendcommand</a></b> <i>boolean</i></code></dd> <dd><code><b><a href="#fullseparators">-fullseparators</a></b> <i>boolean</i></code></dd> | | | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | <dd><code><b><a href="#forceeditendcommand">-forceeditendcommand</a></b> <i>boolean</i></code></dd> <dd><code><b><a href="#fullseparators">-fullseparators</a></b> <i>boolean</i></code></dd> <dd><code><b><a href="#height">-height</a></b> <i>units</i></code></dd> <dd><code><b><a href="#incrarrowtype">-incrarrowtype</a></b> <b>up</b>|<b>down</b></code></dd> <dd><code><b><a href="#instanttoggle">-instanttoggle</a></b> <i>boolean</i></code></dd> |
︙ | ︙ | |||
217 218 219 220 221 222 223 224 225 226 227 228 229 230 | <i>boolean</i></code></dd> <dd><code><b><a href="#resizablecolumns">-resizablecolumns</a></b> <i>boolean</i></code></dd> <dd><code><b><a href="#resizecursor">-resizecursor</a></b> <i>cursor</i></code></dd> <dd><code><b><a href="#selectmode">-selectmode</a></b> <b>single</b>|<b>browse</b>|<b>multiple</b>|<b>extended</b></code></dd> <dd><code><b><a href="#selecttype">-selecttype</a></b> <b>row</b>|<b>cell</b></code></dd> | > > > | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | <i>boolean</i></code></dd> <dd><code><b><a href="#resizablecolumns">-resizablecolumns</a></b> <i>boolean</i></code></dd> <dd><code><b><a href="#resizecursor">-resizecursor</a></b> <i>cursor</i></code></dd> <dd><code><b><a href="#selectfiltercommand">-selectfiltercommand</a></b> <i>command</i></code></dd> <dd><code><b><a href="#selectmode">-selectmode</a></b> <b>single</b>|<b>browse</b>|<b>multiple</b>|<b>extended</b></code></dd> <dd><code><b><a href="#selecttype">-selecttype</a></b> <b>row</b>|<b>cell</b></code></dd> |
︙ | ︙ | |||
388 389 390 391 392 393 394 395 396 397 398 399 400 401 | <dd><code><b><a href="#col_name">-name</a></b> <i>name</i></code></dd> <dd><code><b><a href="#col_resizable">-resizable</a></b> <i>boolean</i></code></dd> <dd><code><b><a href="#col_selectbackground">-selectbackground</a></b> <i>color</i></code></dd> <dd><code><b><a href="#col_selectforeground">-selectforeground</a></b> <i>color</i></code></dd> <dd><code><b><a href="#col_showarrow">-showarrow</a></b> <i>boolean</i></code></dd> | > > > | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | <dd><code><b><a href="#col_name">-name</a></b> <i>name</i></code></dd> <dd><code><b><a href="#col_resizable">-resizable</a></b> <i>boolean</i></code></dd> <dd><code><b><a href="#col_selectbackground">-selectbackground</a></b> <i>color</i></code></dd> <dd><code><b><a href="#col_labelopts">-selectfiltercommand</a></b> <i>command</i></code></dd> <dd><code><b><a href="#col_selectforeground">-selectforeground</a></b> <i>color</i></code></dd> <dd><code><b><a href="#col_showarrow">-showarrow</a></b> <i>boolean</i></code></dd> |
︙ | ︙ | |||
559 560 561 562 563 564 565 | <dt class="tm"><a href="#colors_and_fonts">COLORS AND FONTS</a></dt> <dt class="tm"><a href="#tree_widget">USING A TABLELIST AS MULTI-COLUMN TREE WIDGET</a></dt> <dt class="tm"><a href="#cell_editing">INTERACTIVE CELL EDITING</a></dt> | | | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | <dt class="tm"><a href="#colors_and_fonts">COLORS AND FONTS</a></dt> <dt class="tm"><a href="#tree_widget">USING A TABLELIST AS MULTI-COLUMN TREE WIDGET</a></dt> <dt class="tm"><a href="#cell_editing">INTERACTIVE CELL EDITING</a></dt> <dt class="tm"><a href="#drag_and_drop_support">DRAG & DROP SUPPORT</a></dt> <dt class="tm"><a href="#virtual_events">VIRTUAL EVENTS</a></dt> <dt class="tm"><a href="#row_indices">ROW INDICES</a></dt> <dd> |
︙ | ︙ | |||
1454 1455 1456 1457 1458 1459 1460 | Instead of an image, a tablelist cell (in both the body and the header) can also contain an embedded window, placed to the left or right of the text, just like an embedded image.</dd> <dd class="tm">When a tablelist is used as a tree widget, one of its columns will display the tree hierarchy with the aid of indentations and expand/collapse controls. The Tablelist package provides a great | | | 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 | Instead of an image, a tablelist cell (in both the body and the header) can also contain an embedded window, placed to the left or right of the text, just like an embedded image.</dd> <dd class="tm">When a tablelist is used as a tree widget, one of its columns will display the tree hierarchy with the aid of indentations and expand/collapse controls. The Tablelist package provides a great variety of tree styles controlling the look & feel of that column, and chooses the correct default style depending on the windowing system, operating system version, and tile theme. In a tablelist used as a multi-column tree widget, every row of its body (but not of its header) is at the same time a tree <b>node</b>, having exactly one <b>parent</b> node and any number of <b>child</b> nodes. The tree's origin is the invisible <b>root</b> node, which has no parent itself and whose children are the <b>top-level</b> nodes.</dd> |
︙ | ︙ | |||
1532 1533 1534 1535 1536 1537 1538 | <code><b>-highlightthickness</b></code> options are only supported by the Tablelist package, but not by Tablelist_tile. When using the package Tablelist_tile, the options <code><b>-selectbackground</b></code>, <code><b>-selectborderwidth</b></code>, and <code><b>-selectforeground</b></code> have theme-specific default values.</dd> | | > > > > > > > > > > | 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 | <code><b>-highlightthickness</b></code> options are only supported by the Tablelist package, but not by Tablelist_tile. When using the package Tablelist_tile, the options <code><b>-selectbackground</b></code>, <code><b>-selectborderwidth</b></code>, and <code><b>-selectforeground</b></code> have theme-specific default values.</dd> <dd class="tm"><b>REMARK 1:</b> If the value of the <code><b><a href= "#width">-width</a></b></code> configuration option is zero or less and the tablelist has <a href="#stretch">stretchable</a> columns, then the <code><b>-setgrid</b></code> option will be ignored. This minor restriction has technical reasons and is only relevant on X11.</dd> <dd class="tm"><b>REMARK 2:</b> Instead of creating the scrollbar(s) manually and settings the <code><b>-xscrollcommand</b></code> and/or <code><b>-yscrollcommand</b></code> options accordingly, you might consider to use the <a href= "http://www.nemethi.de/scrollutil/scrollarea.html">scrollarea</a> widget of the <a href="http://www.nemethi.de/scrollutil/">Scrollutil</a> package, which greatly simplifies the creation of arbitrary scrolled widgets, supports both static and dynamic scrollbars, and respects the header component and title columns of tablelist widgets.</dd> <dt class="tm" id="body_options"><b>OPTIONS FOR THE BODY AND HEADER COMPONENTS OF THE WIDGET</b></dt> <dd> <pre> <b>-background -disabledforeground -font -foreground</b> |
︙ | ︙ | |||
1654 1655 1656 1657 1658 1659 1660 | operation, the command specified by this option might look like in the code below:</p> <blockquote> <pre> proc acceptDropCmd {tbl targetRow sourceRow} { set rowCount [[$tbl <a href="#size">size</a>] | | | 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 | operation, the command specified by this option might look like in the code below:</p> <blockquote> <pre> proc acceptDropCmd {tbl targetRow sourceRow} { set rowCount [[$tbl <a href="#size">size</a>] return [expr {$sourceRow != $rowCount - 1 && $targetRow < $rowCount}] } </pre> </blockquote> </blockquote> </dd> <dd id="activestyle"> |
︙ | ︙ | |||
1882 1883 1884 1885 1886 1887 1888 | no effect.</p> <p>On Windows Vista, 7, 8, and 10, the sort arrows are shown horizontally centered in the header labels, just below their top edges:</p> <p><img src="arrowStyles_vista.png" alt="Arrow Styles Vista" width= | | | 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 | no effect.</p> <p>On Windows Vista, 7, 8, and 10, the sort arrows are shown horizontally centered in the header labels, just below their top edges:</p> <p><img src="arrowStyles_vista.png" alt="Arrow Styles Vista" width= "638" height="123"></p> <p>The arrow style <code><b>photo7x7</b></code> uses PNG images that look and behave very close to the native sort arrows on Mac OS X Aqua versions earlier than 10.10 (Yosemite). This arrow style is only supported if the Tk version is either 8.6 (with built-in PNG support), or 8.5 and the <code><b>img::png</b></code> package can be loaded into the interpreter. When supported, <code><b>photo7x7</b></code> |
︙ | ︙ | |||
1962 1963 1964 1965 1966 1967 1968 | <blockquote> <p>Specifies a boolean value that controls whether to trigger the automatic scrolling when the mouse leaves the tablelist window with button 1 down. The default is <code>1</code>, meaning that automatic scrolling will be in effect, just like in the case of the Tk listbox widget. However, when using the TkDND package or some | | | | 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 | <blockquote> <p>Specifies a boolean value that controls whether to trigger the automatic scrolling when the mouse leaves the tablelist window with button 1 down. The default is <code>1</code>, meaning that automatic scrolling will be in effect, just like in the case of the Tk listbox widget. However, when using the TkDND package or some other drag & drop implementation, you might want to set this option to <code>0</code>, in order to avoid any conflicts between the drag operation and the automatic scrolling.</p> <p><b>REMARK:</b> Starting with Tablelist version 5.12, this option has become obsolete, because the default bindings now suppress the above-mentioned automatic scrolling if the tablelist's body component was registered as a drag source for mouse button 1 via the <code><b>tkdnd::drag_source register</b></code> or the |
︙ | ︙ | |||
2258 2259 2260 2261 2262 2263 2264 | <td><code><b> CustomDragSource</b></code></td> </tr> </table> <blockquote> <p>Specifies a boolean value that indicates whether the tablelist | | | | | 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 | <td><code><b> CustomDragSource</b></code></td> </tr> </table> <blockquote> <p>Specifies a boolean value that indicates whether the tablelist widget is a drag source for some drag & drop implementation other than TkDND and the drag & drop framework included in BWidget. If true then the default bindings will perform an automatic <a href= "#global_drag_and_drop">drag-friendly handling of the selection</a> and will suppress the automatic scrolling when the mouse leaves the tablelist window with button 1 down. The default is <code>0</code>.</p> </blockquote> </dd> |
︙ | ︙ | |||
2603 2604 2605 2606 2607 2608 2609 | <td>Database Class:</td> <td><code><b> Height</b></code></td> </tr> </table> <blockquote> | | | | | | | | > > > > | | > > > > > > > > > | 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 | <td>Database Class:</td> <td><code><b> Height</b></code></td> </tr> </table> <blockquote> <p>Specifies the desired height for the tablelist's body, in units of characters in the font given by the <code><b>-font</b></code> option. This is at the same time the desired height in rows, provided that no column-, row-, or cell-specific fonts, multi-line elements, or embedded images or windows make the height of any of the body items different from the one corresponding to the above-mentioned font. If the option's value is zero or less, then the body's desired height in units of characters in the widget's font is kept in sync with the number of <a href="#isviewable">viewable</a> body items; again, if all the items in the tablelist's body have the height corresponding to the widget's font then this means that the body's desired height is made just large enough to hold all the viewable body items.</p> <p><b>REMARK:</b> Embedded images and windows often make the rows of the tablelist higher, resulting in a discrepancy between the value of this option and the number of rows visible in the body window. In many cases you can work around this problem by saving the value of the widget's <code><b>-font</b></code> option, setting the latter to a sufficiently large font, and then setting the <code><b>-font</b></code> row configuration option of each body item to the saved widget font value.</p> </blockquote> </dd> <dd id="incrarrowtype"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Command-Line Name: </td> |
︙ | ︙ | |||
2841 2842 2843 2844 2845 2846 2847 | <td>Database Class:</td> <td><code><b> LabelCommand</b></code></td> </tr> </table> <blockquote> | | | > | | | | > > | | | > | 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 | <td>Database Class:</td> <td><code><b> LabelCommand</b></code></td> </tr> </table> <blockquote> <p>Specifies a Tcl command to be invoked when mouse button 1 is pressed over one of the header labels and later released over the same label. Provided that the option's value is a nonempty string, when the <code><b><ButtonRelease-1></b></code> event occurs, the command is automatically concatenated with the path name of the tablelist widget and the column index of the respective label, and the resulting script is evaluated in the global scope. If another nonempty command was specified as the value of the option of the same name at column level then that column-specific command will be used instead of the global one. If the tablelist's <code><b><a href= "#state">state</a></b></code> is <code><b>disabled</b></code> then this action will not take place. The most common value of this option is <code><b><a href= "tablelistColSort.html#sortByColumn">tablelist::sortByColumn</a></b></code>; this command sorts the items based on the column whose index was passed to it as second argument.</p> </blockquote> </dd> <dd id="labelcommand2"> |
︙ | ︙ | |||
2878 2879 2880 2881 2882 2883 2884 | <td>Database Class:</td> <td><code><b> LabelCommand2</b></code></td> </tr> </table> <blockquote> | | | | > | > > | | | > | 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 | <td>Database Class:</td> <td><code><b> LabelCommand2</b></code></td> </tr> </table> <blockquote> <p>Specifies a Tcl command to be invoked when mouse button 1 is pressed together with the <code>Shift</code> key over one of the header labels and later released over the same label. Provided that the option's value is a nonempty string, when the <code><b><ButtonRelease-1></b></code> event occurs, the command is automatically concatenated with the path name of the tablelist widget and the column index of the respective label, and the resulting script is evaluated in the global scope. If another nonempty command was specified as the value of the option of the same name at column level then that column-specific command will be used instead of the global one. If the tablelist's <code><b><a href= "#state">state</a></b></code> is <code><b>disabled</b></code> then this action will not take place. The most common value of this option is <code><b><a href= "tablelistColSort.html#addToSortColumns">tablelist::addToSortColumns</a></b></code>; this command adds the column index passed to it as second argument to the list of sort columns and sorts the items based on the columns indicated by the modified list.</p> </blockquote> </dd> |
︙ | ︙ | |||
3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 | <td><code><b> MovableRows</b></code></td> </tr> </table> <blockquote> <p>Specifies a boolean value that determines whether the rows displayed in the tablelist's body can be moved interactively. See the <a href="#body_bindings">DEFAULT AND INDIVIDUAL BINDINGS FOR THE TABLELIST BODY</a> section below for information on moving a row interactively. The default value is <code>0</code>.</p> <p><b>REMARK:</b> The support for moving a row is restricted to the widget's body component. Moving of header rows is not supported.</p> | > | 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 | <td><code><b> MovableRows</b></code></td> </tr> </table> <blockquote> <p>Specifies a boolean value that determines whether the rows displayed in the tablelist's body can be moved interactively. See the <a href="#local_drag_and_drop">LOCAL DRAG & DROP</a> subsection of the <a href="#body_bindings">DEFAULT AND INDIVIDUAL BINDINGS FOR THE TABLELIST BODY</a> section below for information on moving a row interactively. The default value is <code>0</code>.</p> <p><b>REMARK:</b> The support for moving a row is restricted to the widget's body component. Moving of header rows is not supported.</p> |
︙ | ︙ | |||
3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 | resizing. The default value is <code><b>sb_h_double_arrow</b></code> on the windowing systems <code><b>x11</b></code> and <code><b>win32</b></code>, and the native cursor <code><b>resizeleftright</b></code> on the Macintosh windowing systems <code><b>classic</b></code> and <code><b>aqua</b></code>.</p> </blockquote> </dd> <dd id="selectmode"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Command-Line Name: </td> <td><code><b>-selectmode</b></code></td> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | resizing. The default value is <code><b>sb_h_double_arrow</b></code> on the windowing systems <code><b>x11</b></code> and <code><b>win32</b></code>, and the native cursor <code><b>resizeleftright</b></code> on the Macintosh windowing systems <code><b>classic</b></code> and <code><b>aqua</b></code>.</p> </blockquote> </dd> <dd id="selectfiltercommand"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Command-Line Name: </td> <td><code><b>-selectfiltercommand</b></code></td> </tr> <tr> <td>Database Name:</td> <td><code><b> selectFilterCommand</b></code></td> </tr> <tr> <td>Database Class:</td> <td><code><b> SelectFilterCommand</b></code></td> </tr> </table> <blockquote> <p>Specifies a Tcl command which can be used for filtering the cells that will be selected when the default bindings for the header labels perform a <a href="#columnwise_selection">column-wise cell selection</a>. If the option's value is a nonempty string then this command is concatenated with the path name of the tablelist widget and the numerical index of the respective column, and the resulting script is evaluated in the global scope. If another nonempty command was specified as the value of the option of the same name at column level then that column-specific command will be used instead of the global one. In both cases, the resulting script is expected to return a list consisting of the row numbers of those cells contained in the column in question that are to be selected by the column-wise cell selection operation.</p> </blockquote> </dd> <dd id="selectmode"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Command-Line Name: </td> <td><code><b>-selectmode</b></code></td> |
︙ | ︙ | |||
4365 4366 4367 4368 4369 4370 4371 | command from the BWidget package to display the full cell and label texts as tooltips for the cells and header labels with snipped contents.</p> <blockquote> <pre> proc tooltipAddCmd {tbl row col} { | | | | | | 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 | command from the BWidget package to display the full cell and label texts as tooltips for the cells and header labels with snipped contents.</p> <blockquote> <pre> proc tooltipAddCmd {tbl row col} { if {($row >= 0 && [$tbl <a href= "#iselemsnipped">iselemsnipped</a> $row,$col fullText]) || ($row < 0 && [$tbl <a href= "#istitlesnipped">istitlesnipped</a> $col fullText])} { DynamicHelp::add $tbl -text $fullText } } </pre> </blockquote> <p>If the widget can also contain header items then a slightly more complicated procedure is needed:</p> <blockquote> <pre> proc tooltipAddCmd {tbl row col} { if {[string is integer $row]} { if {($row >= 0 && [$tbl <a href= "#iselemsnipped">iselemsnipped</a> $row,$col fullText]) || ($row < 0 && [$tbl <a href= "#istitlesnipped">istitlesnipped</a> $col fullText])} { DynamicHelp::add $tbl -text $fullText } } else { set row [string range $row 1 end] if {[$tbl <a href= "#hdr_iselemsnipped">header iselemsnipped</a> $row,$col fullText]} { |
︙ | ︙ | |||
4414 4415 4416 4417 4418 4419 4420 | <p>If you prefer to use the <code><b>tooltip::tooltip</b></code> command from the tooltip package contained in tklib then the procedure becomes</p> <blockquote> <pre> proc tooltipAddCmd {tbl row col} { | | | | | | 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 | <p>If you prefer to use the <code><b>tooltip::tooltip</b></code> command from the tooltip package contained in tklib then the procedure becomes</p> <blockquote> <pre> proc tooltipAddCmd {tbl row col} { if {($row >= 0 && [$tbl <a href= "#iselemsnipped">iselemsnipped</a> $row,$col fullText]) || ($row < 0 && [$tbl <a href= "#istitlesnipped">istitlesnipped</a> $col fullText])} { tooltip::tooltip $tbl $fullText } } </pre> </blockquote> <p>or, to cover also the case of header items:</p> <blockquote> <pre> proc tooltipAddCmd {tbl row col} { if {[string is integer $row]} { if {($row >= 0 && [$tbl <a href= "#iselemsnipped">iselemsnipped</a> $row,$col fullText]) || ($row < 0 && [$tbl <a href= "#istitlesnipped">istitlesnipped</a> $col fullText])} { tooltip::tooltip $tbl $fullText } } else { set row [string range $row 1 end] if {[$tbl <a href= "#hdr_iselemsnipped">header iselemsnipped</a> $row,$col fullText]} { |
︙ | ︙ | |||
4578 4579 4580 4581 4582 4583 4584 | <td>Database Class:</td> <td><code><b> TreeStyle</b></code></td> </tr> </table> <blockquote> | | | | | | | | | | 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 | <td>Database Class:</td> <td><code><b> TreeStyle</b></code></td> </tr> </table> <blockquote> <p>Specifies the look & feel of the column containing the indentations and expand/collapse controls in the body of a a tablelist used as a tree widget. This includes, among others, the images used for displaying the expand/collapse controls, the indentation width, and whether expand/collapse controls and indentations are to be protected when selecting a row or cell. The currently supported values are shown at a glance in the two tables below:</p> <p>Tree styles for native look & feel:</p> <table border="2" cellspacing="0" cellpadding="3" rules="groups"> <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> |
︙ | ︙ | |||
4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 | <th><code>winxpSilver</code></th> </tr> </tbody> <tbody align="center"> <tr> <td><img src="vistaAero.png" alt="vistaAero" width="120" height= "54"></td> <td><img src="vistaClassic.png" alt="vistaClassic" width="120" height="51"></td> <td><img src="win7Aero.png" alt="win7Aero" width="120" height= "54"></td> <td><img src="win7Classic.png" alt="win7Classic" width="120" height="51"></td> <td><img src="win10.png" alt="win110" width="120" height= "54"></td> | > > < < > > < < | 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 | <th><code>winxpSilver</code></th> </tr> </tbody> <tbody align="center"> <tr> <td><img src="aqua.png" alt="aqua" width="120" height="54"></td> <td><img src="vistaAero.png" alt="vistaAero" width="120" height= "54"></td> <td><img src="vistaClassic.png" alt="vistaClassic" width="120" height="51"></td> <td><img src="win7Aero.png" alt="win7Aero" width="120" height= "54"></td> <td><img src="win7Classic.png" alt="win7Classic" width="120" height="51"></td> <td><img src="win10.png" alt="win110" width="120" height= "54"></td> </tr> <tr> <th><code>aqua</code></th> <th><code>vistaAero</code></th> <th><code>vistaClassic</code></th> <th><code>win7Aero</code></th> <th><code>win7Classic</code></th> <th><code>win10</code></th> </tr> </tbody> <tbody align="center"> <tr> <td><img src="ambiance.png" alt="ambiance" width="120" height= "63"></td> |
︙ | ︙ | |||
4924 4925 4926 4927 4928 4929 4930 | <p>If the tree style is <code><b>gtk</b></code>, <code><b>adwaita</b></code>, <code><b>blueMenta</b></code>, <code><b>ubuntu</b></code>, <code><b>ubuntu2</b></code>, <code><b>ubuntu3</b></code>, <code><b>mint</b></code>, <code><b>mint2</b></code>, <code><b>mate</b></code>, <code><b>menta</b></code>, <code><b>ubuntuMate</b></code>, <code><b>arc</b></code>, <code><b>oxygen2</b></code>, | | | | 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 | <p>If the tree style is <code><b>gtk</b></code>, <code><b>adwaita</b></code>, <code><b>blueMenta</b></code>, <code><b>ubuntu</b></code>, <code><b>ubuntu2</b></code>, <code><b>ubuntu3</b></code>, <code><b>mint</b></code>, <code><b>mint2</b></code>, <code><b>mate</b></code>, <code><b>menta</b></code>, <code><b>ubuntuMate</b></code>, <code><b>arc</b></code>, <code><b>oxygen2</b></code>, <code><b>aqua</b></code>, <code><b>vistaAero</b></code>, <code><b>win7Aero</b></code>, <code><b>win10</b></code>, <code><b>newWave</b></code>, <code><b>plain*</b></code>, or <code><b>bicolor*</b></code>, and the Tk version is either 8.6 (with built-in PNG support) or 8.5 and the <code><b>img::png</b></code> package can be loaded into the interpreter, then the images used for displaying the expand/collapse controls are PNG images with alpha channel. Otherwise (i.e., for the other tree styles or in the absence of PNG support) GIF images are used for the expand/collapse |
︙ | ︙ | |||
5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 | Instead, the event will be redirected to the widget container or the toplevel widget with the aid of the <code><b>event generate</b></code> command. This in turn will give rise to horizontal scrolling of the widget container, provided that the containing toplevel widget or the binding tag <code><b>all</b></code> has the necessary mouse wheel event bindings.</li> </ul> </blockquote> </dd> <dd id="ymousewheelwindow"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Command-Line Name: </td> | > > > > > > | 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 | Instead, the event will be redirected to the widget container or the toplevel widget with the aid of the <code><b>event generate</b></code> command. This in turn will give rise to horizontal scrolling of the widget container, provided that the containing toplevel widget or the binding tag <code><b>all</b></code> has the necessary mouse wheel event bindings.</li> </ul> <p><b>REMARK 3:</b> If you pass the tablelist widget to the <code><b><a href= "http://www.nemethi.de/scrollutil/wheelEvent.html#adapt">scrollutil::adaptWheelEventHandling</a></b></code> command then the latter sets this option to the path name of the containing toplevel window.</p> </blockquote> </dd> <dd id="ymousewheelwindow"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Command-Line Name: </td> |
︙ | ︙ | |||
5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 | Instead, the event will be redirected to the widget container or the toplevel widget with the aid of the <code><b>event generate</b></code> command. This in turn will give rise to vertical scrolling of the widget container, provided that the containing toplevel widget or the binding tag <code><b>all</b></code> has the necessary mouse wheel event bindings.</li> </ul> </blockquote> </dd> <dt id="col_options"><b>COLUMN CONFIGURATION OPTIONS</b></dt> <dd>The following options are currently supported by the <code><b><a href= "#columncget">columncget</a></b></code>, <code><b><a href= | > > > > > > | 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 | Instead, the event will be redirected to the widget container or the toplevel widget with the aid of the <code><b>event generate</b></code> command. This in turn will give rise to vertical scrolling of the widget container, provided that the containing toplevel widget or the binding tag <code><b>all</b></code> has the necessary mouse wheel event bindings.</li> </ul> <p><b>REMARK 3:</b> If you pass the tablelist widget to the <code><b><a href= "http://www.nemethi.de/scrollutil/wheelEvent.html#adapt">scrollutil::adaptWheelEventHandling</a></b></code> command then the latter sets this option to the path name of the containing toplevel window.</p> </blockquote> </dd> <dt id="col_options"><b>COLUMN CONFIGURATION OPTIONS</b></dt> <dd>The following options are currently supported by the <code><b><a href= "#columncget">columncget</a></b></code>, <code><b><a href= |
︙ | ︙ | |||
6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 | <code><b>-labelcommand2</b> <i>command</i></code><br> <code><b>-labelfont</b> <i>fontName</i></code><br> <code><b>-labelforeground</b> <i>color</i></code> or <code><b>-labelfg</b> <i>color</i></code><br> <code><b>-labelheight</b> <i>lines</i></code><br> <code><b>-labelpady</b> <i>screenDistance</i></code><br> <code><b>-labelrelief</b> <i>relief</i></code></dt> <dd>The value of each of these options may also be an empty string. These options are the column-specific equivalents of the global ones having the same names, described in the <a href= "#widget_options">WIDGET-SPECIFIC OPTIONS</a> section. They override the options of the same names set at widget level if the specified value is not empty. If one of these options hasn't been | > | 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 | <code><b>-labelcommand2</b> <i>command</i></code><br> <code><b>-labelfont</b> <i>fontName</i></code><br> <code><b>-labelforeground</b> <i>color</i></code> or <code><b>-labelfg</b> <i>color</i></code><br> <code><b>-labelheight</b> <i>lines</i></code><br> <code><b>-labelpady</b> <i>screenDistance</i></code><br> <code><b>-labelrelief</b> <i>relief</i></code></dt> <code><b>-selectfiltercommand</b> <i>command</i></code><br> <dd>The value of each of these options may also be an empty string. These options are the column-specific equivalents of the global ones having the same names, described in the <a href= "#widget_options">WIDGET-SPECIFIC OPTIONS</a> section. They override the options of the same names set at widget level if the specified value is not empty. If one of these options hasn't been |
︙ | ︙ | |||
7149 7150 7151 7152 7153 7154 7155 | text to the cell's new <i>internal</i> content, which is necessary if, due to the <code><b><a href="#col_formatcommand">-formatcommand</a></b></code> column configuration option, the cell's internal value is different from its external representation. See the description of the <code><b><a href="#forceeditendcommand">-forceeditendcommand</a></b></code> option for more about the invocation of the command mentioned above.</dd> | | < | | | | | | | 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 | text to the cell's new <i>internal</i> content, which is necessary if, due to the <code><b><a href="#col_formatcommand">-formatcommand</a></b></code> column configuration option, the cell's internal value is different from its external representation. See the description of the <code><b><a href="#forceeditendcommand">-forceeditendcommand</a></b></code> option for more about the invocation of the command mentioned above.</dd> <dt class="tm" id="drag_and_drop_support"><b>DRAG & DROP SUPPORT</b></dt> <dd>As <a href="#global_drag_and_drop">described in detail</a> in the <a href="#body_bindings">DEFAULT AND INDIVIDUAL BINDINGS FOR THE TABLELIST BODY</a> section, the default binding scripts perform an automatic drag-friendly handling of the selection and of pointer movements with mouse button 1 down if the tablelist widget's <code><b><a href= "#customdragsource">-customdragsource</a></b></code> opton was set to true or its body component was registered as a drag source for mouse button 1 via the <code><b>tkdnd::drag_source register</b></code> or the BWidget <code><b>DragSite::register</b></code> command.</dd> <dd class="tm">On the other hand, you can also register a tablelist widget as a TkDND drop target, by invoking the <code><b>tkdnd::drop_target register</b></code> command. Similarly, you can register the body component of a tablelist widget as a drop target for the drag & drop framework included in BWidget, with the aid of the <code><b>DropSite::register</b></code> command. (Notice that for BWidget it is necessary to register the tablelist's <i>body</i> rather than the widget itself.)</dd> <dd class="tm">The action to be triggered by a drop event over a tablelist widget might depend on the row under the mouse and the vertical position of the mouse pointer within the containing row (if any). For example, |
︙ | ︙ | |||
7238 7239 7240 7241 7242 7243 7244 | return $action } </pre> </blockquote> </dd> <dd> | | | | | | | 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 | return $action } </pre> </blockquote> </dd> <dd> <b>BWidget EXAMPLE:</b> For an introduction to drag & drop with BWidget see the online tutorial <a href= "http://wiki.tcl.tk/16126">BWidget example: Drag and Drop Demo</a> by Kevin Walzer. The <code><b>DropSite::*</b></code> commands used in the following example are described in the "DropSite" reference page included in the BWidget distribution. When using this drag & drop framework, you will have to register not only the tablelist's body, but also its target indicator as drop sites, to make sure that the target mark won't get hidden by moving the mouse cursor over it with mouse button 1 down: <blockquote> <pre> package require BWidget foreach w [list [$tbl <a href="#bodypath">bodypath</a>] [$tbl <a href= "#targetmarkpath">targetmarkpath</a>]] { DropSite::register $w -dropovercmd tblDropOverCmd -dropcmd tblDropCmd \ -droptypes ... } proc tblDropOverCmd {dropTarget dragSrc event rootX rootY op dataType data} { <i># $event may be "enter", "motion", or "leave"</i> set tbl [<a href= "tablelistBinding.html#getTablelistPath">tablelist::getTablelistPath</a> $dropTarget] if {[string equal $event "leave"]} { set newWidget [winfo containing -displayof $dropTarget $rootX $rootY] if {![string equal $newWidget [$tbl <a href= "#targetmarkpath">targetmarkpath</a>]] && ![string equal $newWidget [$tbl <a href= "#bodypath">bodypath</a>]]} { $tbl <a href="#hidetargetmark">hidetargetmark</a> return 2 ;<i># refuse the drop and re-invoke the callback on motion events</i> } } |
︙ | ︙ | |||
7472 7473 7474 7475 7476 7477 7478 | </tr> <tr valign="top"> <td> <code><b><<TablelistHeaderHeightChanged>></b></code></td> <td>Generated whenever the (requested) height of the tablelist's | | > > > | 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 | </tr> <tr valign="top"> <td> <code><b><<TablelistHeaderHeightChanged>></b></code></td> <td>Generated whenever the (requested) height of the tablelist's header changes. Used by the <a href= "http://www.nemethi.de/scrollutil/scrollarea.html">scrollarea</a> widget of the <a href= "http://www.nemethi.de/scrollutil/">Scrollutil</a> package.</td> <td>The (requested) height of the tablelist's header.</td> </tr> <tr valign="top"> <td> <code><b><<TablelistRowHiddenStateChanged>></b></code></td> |
︙ | ︙ | |||
7531 7532 7533 7534 7535 7536 7537 | <td>Not used.</td> </tr> <tr valign="top"> <td><code><b><<TablelistTitleColsWidthChanged>></b></code></td> <td>Generated whenever the total width of the non-hidden title | | > > > | 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 | <td>Not used.</td> </tr> <tr valign="top"> <td><code><b><<TablelistTitleColsWidthChanged>></b></code></td> <td>Generated whenever the total width of the non-hidden title columns changes. Used by the <a href= "http://www.nemethi.de/scrollutil/scrollarea.html">scrollarea</a> widget of the <a href= "http://www.nemethi.de/scrollutil/">Scrollutil</a> package.</td> <td>The total width of the non-hidden title columns.</td> </tr> <tr valign="top"> <td><code><b><<TablelistViewUpdated>></b></code></td> |
︙ | ︙ | |||
8834 8835 8836 8837 8838 8839 8840 | virtual event is generated, with its <code><b>-data</b></code> option set to the total width of the non-hidden title columns for Tk versions 8.5 and higher.</dd> <dd class="tm"> <b>REMARK 1:</b> This subcommand enables you to manage the vertical scrollbar (if any) to appear below the tablelist widget's | | | | 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 | virtual event is generated, with its <code><b>-data</b></code> option set to the total width of the non-hidden title columns for Tk versions 8.5 and higher.</dd> <dd class="tm"> <b>REMARK 1:</b> This subcommand enables you to manage the vertical scrollbar (if any) to appear below the tablelist widget's header, thus respecting the native look & feel on Mac OS X Aqua and on many modern Linux systems. As shown in the following example, it is recommended to always create a scrolled tablelist along with the scrollbar(s) as children of a (ttk::)frame widget: <blockquote> <pre> <i># Add some entries to the Tk option database</i> option add *ScrollArea.borderWidth 1 |
︙ | ︙ | |||
8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 | <p>For a tablelist widget having two header rows and one title column, the scrollbars of the modified example will appear like in the screenshot below (on Windows this is only valid for the horizontal scrollbar):</p> <p><img src="scrollbars.png" alt="Scrollbars" width="461" height= "274"></p> </blockquote> </dd> <dt id="curcellselection"><code><i>pathName</i> <b>curcellselection</b> ?<b>-all</b>|<b>-nonhidden</b>|<b>-viewable</b>?</code></dt> <dd>Returns a list containing the canonical indices (of the form | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 | <p>For a tablelist widget having two header rows and one title column, the scrollbars of the modified example will appear like in the screenshot below (on Windows this is only valid for the horizontal scrollbar):</p> <p><img src="scrollbars.png" alt="Scrollbars" width="461" height= "274"></p> </blockquote> </dd> <dd> <b>REMARK 3:</b> You can greatly simplify the creation of scrolled tablelists (and other scrolled widgets) by using a <a href= "http://www.nemethi.de/scrollutil/scrollarea.html">scrollarea</a> widget, which is part of the <a href= "http://www.nemethi.de/scrollutil/">Scrollutil</a> package. It supports both static and dynamic scrollbars and respects the header component and title columns of tablelist widgets. With the aid of the scrollarea widget, the rather technical code in the above example can be replaced with just a few lines: <blockquote> <pre> package require scrollutil(_tile) . . . <i># Create the tablelist within a scrollarea</i> set sa [scrollutil::scrollarea ...] set tbl $sa.tbl tablelist::tablelist $tbl ... $sa setwidget $tbl . . . <i># Manage the scrollarea</i> pack $sa -expand yes -fill both -padx 10 -pady 10 </pre> </blockquote> </dd> <dt id="curcellselection"><code><i>pathName</i> <b>curcellselection</b> ?<b>-all</b>|<b>-nonhidden</b>|<b>-viewable</b>?</code></dt> <dd>Returns a list containing the canonical indices (of the form |
︙ | ︙ | |||
9585 9586 9587 9588 9589 9590 9591 | <b>hidetargetmark</b></code></dt> <dd>Hides the horizontal gap or vertical bar displayed by the <code><b><a href="#showtargetmark">showtargetmark</a></b></code> command. No error is generated if the target indicator is not visible at the time the command is invoked.</dd> | | | | | | | 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 | <b>hidetargetmark</b></code></dt> <dd>Hides the horizontal gap or vertical bar displayed by the <code><b><a href="#showtargetmark">showtargetmark</a></b></code> command. No error is generated if the target indicator is not visible at the time the command is invoked.</dd> <dd class="tm">This command is designed to be used during a drag & drop operation for which the tablelist widget (or its body component) was registered as a drop target. See the <a href= "#drag_and_drop_support">DRAG & DROP SUPPORT</a> section for details and examples.</dd> <dt class="tm" id="imagelabelpath"><code><i>pathName</i> <b>imagelabelpath</b> <i>cellIndex</i></code></dt> <dd>Returns the path name of the label widget containing the image embedded into the cell given by <code><i>cellIndex</i></code>, as specified with the <code><b><a href="#cell_image">-image</a></b></code> |
︙ | ︙ | |||
9621 9622 9623 9624 9625 9626 9627 | bind [.tbl <a href= "#bodytag">bodytag</a>] <Button-1> {printClickedImage %W %x %y}<br> proc printClickedImage {w x y} { foreach {tbl x y} [<a href= "tablelistBinding.html#convEventFields">tablelist::convEventFields</a> $w $x $y] {} set cellIdx [$tbl <a href="#containingcell">containingcell</a> $x $y] scan $cellIdx "%d,%d" row col | | | 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 | bind [.tbl <a href= "#bodytag">bodytag</a>] <Button-1> {printClickedImage %W %x %y}<br> proc printClickedImage {w x y} { foreach {tbl x y} [<a href= "tablelistBinding.html#convEventFields">tablelist::convEventFields</a> $w $x $y] {} set cellIdx [$tbl <a href="#containingcell">containingcell</a> $x $y] scan $cellIdx "%d,%d" row col if {$row >= 0 && $col >= 0 && [string compare $w [$tbl <span>imagelabelpath</span> $cellIdx]] == 0} { puts "clicked the image of cell $cellIdx" } } </pre> </blockquote> </dd> |
︙ | ︙ | |||
10543 10544 10545 10546 10547 10548 10549 | number of items or is specified as <code><b>end</b></code> then the horizontal gap will be shown just <i>after</i> the tablelist's last row. If the subcommand is used with the <code><b>inside</b></code> option then the index <code><b>end</b></code> is interpreted as indicating the widget's last item.</dd> | | | | | | | 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 | number of items or is specified as <code><b>end</b></code> then the horizontal gap will be shown just <i>after</i> the tablelist's last row. If the subcommand is used with the <code><b>inside</b></code> option then the index <code><b>end</b></code> is interpreted as indicating the widget's last item.</dd> <dd class="tm">This command is designed to be used during a drag & drop operation for which the tablelist widget (or its body component) was registered as a drop target. See the <a href= "#drag_and_drop_support">DRAG & DROP SUPPORT</a> section for details and examples.</dd> <dt class="tm" id="size"><code><i>pathName</i> <b>size</b></code></dt> <dd>Returns the total number of items in the tablelist body.</dd> <dt class="tm" id="sort"><code><i>pathName</i> <b>sort</b> ?<b>-increasing</b>|<b>-decreasing</b>?</code></dt> |
︙ | ︙ | |||
10753 10754 10755 10756 10757 10758 10759 | respectively. If the option <code><b>-vertical</b></code> was specified and no item of the tablelist's body contains the given y-position, then the return value is the list <code>{<b>inside</b> -1}</code>. The coordinate <code><i>y</i></code> is expected to be relative to the tablelist window itself (not its body component).</dd> | | | | | | | 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 | respectively. If the option <code><b>-vertical</b></code> was specified and no item of the tablelist's body contains the given y-position, then the return value is the list <code>{<b>inside</b> -1}</code>. The coordinate <code><i>y</i></code> is expected to be relative to the tablelist window itself (not its body component).</dd> <dd class="tm">This command is designed to be used during a drag & drop operation for which the tablelist widget (or its body component) was registered as a drop target. See the <a href= "#drag_and_drop_support">DRAG & DROP SUPPORT</a> section for details and examples.</dd> <dt class="tm" id="togglecolumnhide"><code><i>pathName</i> <b>togglecolumnhide</b> <i>firstColumn</i> <i>lastColumn</i></code><br> <code><i>pathName</i> <b>togglecolumnhide</b> <i>columnIndexList</i></code></dt> <dd>Toggles the value of the <code><b><a href= |
︙ | ︙ | |||
11678 11679 11680 11681 11682 11683 11684 | <code><b><<ListboxSelect>></b></code>. Instead of this event (which is supported for compatibility reasons), the virtual event <code><b><<TablelistSelect>></b></code> can be used to be made aware of any changes to tablelist selection. Both events will be generated independently of the selection type.</dd> <dd class="tm" id="local_drag_and_drop"> | | | | | | | | | | | | | | | | | | 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 | <code><b><<ListboxSelect>></b></code>. Instead of this event (which is supported for compatibility reasons), the virtual event <code><b><<TablelistSelect>></b></code> can be used to be made aware of any changes to tablelist selection. Both events will be generated independently of the selection type.</dd> <dd class="tm" id="local_drag_and_drop"> <b>LOCAL DRAG & DROP:</b> The following binding associated with the binding tag <code><b>TablelistBody</b></code> is only valid if the selection mode is <code><b>single</b></code> or <code><b>multiple</b></code>: <blockquote> <p>If mouse button 1 is clicked on an item and then dragged outside that item, and the value of the <code><b><a href= "#movablerows">-movablerows</a></b></code> configuration option is true, then the mouse cursor takes on the shape specified by the <code><b><a href="#movecursor">-movecursor</a></b></code> option, indicating that the item in question is being moved to another position. The new item position (if any) is visualized with the aid of a gap placed before the target row or a bar placed inside the latter (depending on the current mouse position), indicating whether the source item would be moved before this row or become a child of it. This <b>local drag & drop</b> operation ends when mouse button 1 is released, and can be canceled by pressing the <code>Escape</code> key. In both cases, the mouse cursor is reset to its original value, specified by the <code><b>-cursor</b></code> configuration option. After releasing mouse button 1 in the presence of a valid target, the source item is moved before the target row or just before the latter's first child, and the virtual event <code><b><<TablelistRowMoved>></b></code> is generated. For Tk versions 8.5 and higher, this virtual event is generated with its <code><b>-data</b></code> option set to a list of length 3, whose elements are derived from the arguments passed to the second form of the <code><b><a href="#move">move</a></b></code> subcommand invoked for moving the source row to its new position. The first list element will be the full key corresponding to the first argument, the second one will be <code><b>root</b></code> or the full key corresponding to the second argument, and the third list element will be identical to the third argument passed to the <code><b>move</b></code> subcommand.</p> <p>Notice that, depending on the current mouse position during the local drag & drop, there can be a corresponding potential target row or not. For instance, a tree item cannot become a sibling of one of its descendants, and not all items might be allowed to have children or to become top-level ones (example: in a file manager, regular file items cannot be parents of other items and should not be allowed to become top-level ones). To decide whether the row corresponding to the y-coordinate of the current mouse position represents a valid potential target, the Tablelist code first checks whether moving the source item before that row or making it a child of the latter is allowed from the point of view of the general tree structure. If this is the case and the move operation would change the source item's parent (and the Tk version is at least 8.3), and the command specified as the value of the <code><b><a href= "#acceptchildcommand">-acceptchildcommand</a></b></code> configuration option is a nonempty string, then this command is concatenated with the path name of the tablelist widget, the node index of the would-be new parent node, and the row index of the dragged item, the resulting script is evaluated in the global scope, and if the return value (which must be a boolean) is false, then the source item will not be allowed to be moved to the current mouse position. Likewise, if the |
︙ | ︙ | |||
11748 11749 11750 11751 11752 11753 11754 | moved to the current mouse position.</p> <p>Recall that if the selection mode is <code><b>multiple</b></code> then <i>pressing</i> mouse button 1 on a selected item or element normally deselects that item or element (depending on the selection type). However, if in addition the value of the <code><b><a href= "#movablerows">-movablerows</a></b></code> configuration option is true | | | | | | | | | | | | | 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 | moved to the current mouse position.</p> <p>Recall that if the selection mode is <code><b>multiple</b></code> then <i>pressing</i> mouse button 1 on a selected item or element normally deselects that item or element (depending on the selection type). However, if in addition the value of the <code><b><a href= "#movablerows">-movablerows</a></b></code> configuration option is true then the clicked row is a potential drag source for the local drag & drop operation described above, and for this reason the clicked item or element will only be deselected when <i>releasing</i> mouse button 1 over the same item or element.</p> </blockquote> </dd> <dd class="tm" id="global_drag_and_drop"><b>DRAG SOURCE SUPPORT FOR GLOBAL DRAG & DROP:</b> Besides the local drag & drop, the default bindings also support the TkDND compiled extension and the drag & drop framework included in BWidget, as well as custom drag & drop implementations. A tablelist widget is viewed as a <b>drag source for mouse button 1</b> if its body component was registered as such via the <code><b>tkdnd::drag_source register</b></code> or the BWidget <code><b>DragSite::register</b></code> command, or the tablelist's <code><b><a href="#customdragsource">-customdragsource</a></b></code> option was set to true. The default bindings provide drag source support as described below:</dd> <dd> <ol> <li class="tm">If the selection mode is <code><b>extended</b></code> |
︙ | ︙ | |||
11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 | <code><b><<TablelistColumnResized>></b></code> is generated, with its <code><b>-data</b></code> option set to the numerical column index for Tk versions 8.5 and higher. The same action is triggered by double-clicking the resize area of a header label with the <code>Shift</code> key held down.</li> </ol> </dd> <dd class="tm">If the tablelist's <code><b><a href= "#state">state</a></b></code> is <code><b>disabled</b></code> then none of the above actions occur: the labels are completely insensitive.</dd> <dd class="tm"> If you want to define non-default bindings for the header labels, it is | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 | <code><b><<TablelistColumnResized>></b></code> is generated, with its <code><b>-data</b></code> option set to the numerical column index for Tk versions 8.5 and higher. The same action is triggered by double-clicking the resize area of a header label with the <code>Shift</code> key held down.</li> </ol> </dd> <dd class="tm" id="columnwise_selection"><b>BINDINGS FOR COLUMN-WISE CELL SELECTION:</b> If the selection type is <code><b>cell</b></code> then a few further bindings apply to the header labels. In the description below the <code>Alt</code> key can be replaced with <code>Meta</code>; on Mac OS Classic and Mac OS X Aqua the <code>Command</code> key is used instead of <code>Alt</code> and <code>Meta</code>. Notice also that you can restrict the set of cells that will be selected when these bindings perform a column-wise cell selection: If the command specified by the <code><b><a href="#selectfiltercommand">-selectfiltercommand</a></b></code> option is a nonempty string then this command is concatenated with the path name of the tablelist widget and the numerical index of the respective column, and the resulting script is evaluated in the global scope. If another nonempty command was specified as the value of the option of the same name at column level then that column-specific command will be used instead of the global one. In both cases, only those cells contained in that column will be selected whose row numbers are contained in the list returned by the script.</dd> <dd> <ol> <li class="tm">Pressing mouse button 1 on a header label with the <code>Alt</code> key down selects the cells of the corresponding column, deselects everything else, and sets the anchor to the first viewable selected cell of that column; dragging the mouse with button 1 down extends the selection to include all the columns between the anchor and the column under the mouse, inclusive.</li> <li class="tm">If the anchor column contains at least one selected cell then the range of selected columns can be adjusted by pressing button 1 on a header label with the <code>Alt</code> and <code>Shift</code> keys down: this modifies the selection to consist of the cells of the columns between the anchor and the one under the mouse, inclusive. The un-anchored end of this new column-wise cell selection can also be dragged with the button down.</li> <li class="tm">Pressing button 1 on a header label with the <code>Alt</code> and <code>Control</code> keys down starts a toggle operation: the cells of the column corresponding to the clicked label will be deselected if at least one of them was selected before, and selected otherwise; in the first case the anchor is set to the first viewable cell of that column, while in the second case to the column's first viewable selected cell. The selection state of other cells is not changed. If subsequently the mouse is dragged with button 1 down, then the selection state of the cells between the anchor column and the one under the mouse is set to match the toggled state of the anchor column; the selection state of all other cells remains what it was before the toggle operation began.</li> </ol> </dd> <dd class="tm">If the tablelist's <code><b><a href= "#state">state</a></b></code> is <code><b>disabled</b></code> then none of the above actions occur: the labels are completely insensitive.</dd> <dd class="tm"> If you want to define non-default bindings for the header labels, it is |
︙ | ︙ |