Tk Library Source Code

Check-in [deffd2c563]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: deffd2c56399fff24d7fd3ab683b337b3e15d378230c197bd0801e739c381929
User & Date: csaba 2019-07-06 17:47:30
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
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/tablelist/doc/index.html.

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.5</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.5</h1>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>

|








|







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
16
17
18
19
20
21
22
23
..
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
...
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
...
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
...
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
...
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
...
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
....
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
....
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
....
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
....
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
....
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
....
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
....
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
....
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
....
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
....
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
....
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
....
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
....
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
  <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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
................................................................................
    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 &amp; 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>
................................................................................
  of the global and column-specific options refer to the header titles,
  implemented as label widgets.&nbsp; For instance, the
  <code>-labelcommand</code> option specifies a Tcl command to be invoked when
  mouse button 1 is released over a header label.&nbsp; 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 &amp; 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.&nbsp; 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.&nbsp; In addition, a rich set of keyboard bindings is provided
  for a comfortable navigation between the editable cells.</p>
................................................................................
      <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.&nbsp;
  The distribution file is <code>tablelist6.5.tar.gz</code> for UNIX and
  <code>tablelist6_5.zip</code> for Windows.&nbsp; 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>
................................................................................
  a directory at the same level as the Tcl and Tk script libraries.&nbsp; 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.5.tar.gz</code>:</p>

  <blockquote>
    <pre>
gunzip -c tablelist6.5.tar.gz | tar -xf -
</pre>
  </blockquote>

  <p>On most UNIX systems this can be replaced with</p>

  <blockquote>
    <pre>
tar -zxf tablelist6.5.tar.gz
</pre>
  </blockquote>

  <p>Both commands will create a directory named <code>tablelist6.5</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_5.zip</code> into the directory
  <code>tablelist6.5</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.&nbsp; 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.&nbsp; Finally, the file
................................................................................
  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>&nbsp; If you have an earlier Tablelist version as part of
  ActiveTcl 8.5 or above and the new Tablelist release 6.5, then it is highly
  recommended to specify the version number <code>6.5</code> in the&nbsp;
  <code>package require</code>&nbsp; command, because otherwise the interpreter
  will load the old Tablelist version included in ActiveTcl as Tcl
  Module.&nbsp; The <a href="#examples">examples</a> below use the
  statement&nbsp; <code>package require tablelist 6.5</code>,&nbsp; and their
  tile-based counterparts invoke the command&nbsp; <code>package require
  tablelist_tile 6.5</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>?
................................................................................
      the <code>tablelist::library</code> variable to find the location of the
      file.&nbsp; 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.5
source [file join $tablelist::library demos config.tcl]
</pre>
      </blockquote>
    </li>
  </ul>

  <p>In both cases, the script will print the following message to
................................................................................
  known from the standard Tk widgets.&nbsp; 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.5

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:
    #
................................................................................

  <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>.&nbsp; Notice how the <code><a href=
  "tablelistWidget.html#cornerpath">cornerpath</a></code> subcommand enables us
  to achieve a native look &amp; 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.&nbsp; The same script is associated with the
  <b>Refresh</b> button, as the value of its <code>-command</code>
  configuration option.&nbsp; This procedure is implemented as follows:</p>

  <blockquote>
................................................................................
  <code>browseTree.tcl</code>.&nbsp; 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.5

namespace eval demo {
    variable dir [file dirname [info script]]

    #
    # Create two images, needed in the procedure putChildren
    #
................................................................................
  in the <a href="#ex_browse">previous section</a>.&nbsp; 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.5

#
# Add some entries to the Tk option database
#
set dir [file dirname [info script]]
source [file join $dir option.tcl]

................................................................................
</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>.&nbsp; For this class, the file
  <code>option.tcl</code>, <code>source</code>d into the main script, contains
  some look &amp; 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
................................................................................
    } 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 &amp; 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]
        }
................................................................................
        } 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] &amp;&amp; [llength \
                [glob -nocomplain -types {d f} -directory $name *]] != 0} {
                $tbl collapse $row
            }
        }

        incr row
    }
................................................................................
</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 &amp; 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.&nbsp; It creates 8 tablelist widgets, shown in
  the following figure:</p>

  <blockquote>
................................................................................
  <code>miscWidgets.tcl</code> are similar).&nbsp; A few parts of the code are
  shown in <span>red</span> color &ndash; 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.5
package require BWidget

wm title . "Serial Line Configuration"

#
# Add some entries to the Tk option database
#
................................................................................

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 &amp; time to 10 minutes past the current clock value
#
set clock [expr {[clock seconds] + 600}]
for {set i 0; set n 1} {$i &lt; 16} {set i $n; incr n} {
    $tbl insert end [list $n [expr {$i &lt; 8}] "Line $n" 9600 8 None 1 XON/XOFF \
        $clock $clock [lindex $colorNames $i]]

    <span>set availImg [expr {($i &lt; 8) ? "checkedImg" : "uncheckedImg"}]
................................................................................
            #
            # 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] &lt;= 6 &amp;&amp; [regexp {^[0-9]*$} %S]}}
        }

        dataBits {
            #
            # Configure the SpinBox
            #
            $w configure -range {5 8 1} -editable no
................................................................................
            # "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 &lt;= [clock seconds]} {
                bell
                tk_messageBox -title "Error" -icon error -message \
                    "The activation date &amp; time must be in the future"
                $tbl rejectinput
            } else {
                $tbl cellconfigure $row,actTime -text $actClock
                return $actClock
            }
        }

................................................................................
    "310">
  </blockquote>

  <p>First, we create and populate the tablelist widget:</p>

  <blockquote>
    <pre>
package require tablelist 6.5

wm title . "Tk Library Scripts"

#
# Add some entries to the Tk option database
#
set dir [file dirname [info script]]
................................................................................
  <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.5
</pre>
  </blockquote>

  <p>with</p>

  <blockquote>
    <pre>
package require tablelist<span>_tile</span> 6.5
</pre>
  </blockquote>

  <p>and the command</p>

  <blockquote>
    <pre>
................................................................................
}
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 &amp; feel, but also the tile entry, spinbox, combobox,
  checkbutton, and menubutoon widgets for interactive cell editing.&nbsp; The
  resulting window has a nice theme-specific appearance:</p>

  <blockquote>
    <img src="tileWidgets.png" alt="Serial Line Configuration" width="839"
    height="404">
  </blockquote>






|







 







|







 







|
|







 







|
|







 







|



|







|



|




|
|







 







|
|



|

|







 







|







 







|







 







|
|
|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







|







 







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
...
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
...
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
...
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
...
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
...
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
....
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
....
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
....
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
....
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
....
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
....
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
....
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
....
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
....
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
....
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
....
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
....
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
....
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
  <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>
................................................................................
    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>
................................................................................
  of the global and column-specific options refer to the header titles,
  implemented as label widgets.&nbsp; For instance, the
  <code>-labelcommand</code> option specifies a Tcl command to be invoked when
  mouse button 1 is released over a header label.&nbsp; 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.&nbsp; 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.&nbsp; In addition, a rich set of keyboard bindings is provided
  for a comfortable navigation between the editable cells.</p>
................................................................................
      <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.&nbsp;
  The distribution file is <code>tablelist6.6.tar.gz</code> for UNIX and
  <code>tablelist6_6.zip</code> for Windows.&nbsp; 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>
................................................................................
  a directory at the same level as the Tcl and Tk script libraries.&nbsp; 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.&nbsp; 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.&nbsp; Finally, the file
................................................................................
  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>&nbsp; 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&nbsp;
  <code>package require</code>&nbsp; command, because otherwise the interpreter
  will load the old Tablelist version included in ActiveTcl as Tcl
  Module.&nbsp; The <a href="#examples">examples</a> below use the
  statement&nbsp; <code>package require tablelist 6.6</code>,&nbsp; and their
  tile-based counterparts invoke the command&nbsp; <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>?
................................................................................
      the <code>tablelist::library</code> variable to find the location of the
      file.&nbsp; 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
................................................................................
  known from the standard Tk widgets.&nbsp; 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:
    #
................................................................................

  <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>.&nbsp; 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.&nbsp; The same script is associated with the
  <b>Refresh</b> button, as the value of its <code>-command</code>
  configuration option.&nbsp; This procedure is implemented as follows:</p>

  <blockquote>
................................................................................
  <code>browseTree.tcl</code>.&nbsp; 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
    #
................................................................................
  in the <a href="#ex_browse">previous section</a>.&nbsp; 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]

................................................................................
</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>.&nbsp; 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
................................................................................
    } 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]
        }
................................................................................
        } 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
    }
................................................................................
</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.&nbsp; It creates 8 tablelist widgets, shown in
  the following figure:</p>

  <blockquote>
................................................................................
  <code>miscWidgets.tcl</code> are similar).&nbsp; A few parts of the code are
  shown in <span>red</span> color &ndash; 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
#
................................................................................

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 &lt; 16} {set i $n; incr n} {
    $tbl insert end [list $n [expr {$i &lt; 8}] "Line $n" 9600 8 None 1 XON/XOFF \
        $clock $clock [lindex $colorNames $i]]

    <span>set availImg [expr {($i &lt; 8) ? "checkedImg" : "uncheckedImg"}]
................................................................................
            #
            # 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] &lt;= 6 && [regexp {^[0-9]*$} %S]}}
        }

        dataBits {
            #
            # Configure the SpinBox
            #
            $w configure -range {5 8 1} -editable no
................................................................................
            # "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 &lt;= [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
            }
        }

................................................................................
    "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]]
................................................................................
  <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>
................................................................................
}
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.&nbsp; 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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
15
16
17
18
19
20
21
22
...
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
  <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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
................................................................................
    <code><b>mentry::dateTimeMentry</b></code> command from the Mentry (or
    Mentry_tile) package for interactive cell editing in tablelist
    widgets.&nbsp; 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.&nbsp; If the
    <code><b>-gmt</b></code> argument is present then both the internal clock
    value and its external date &amp; time representation in the mentry widget
    will be viewed as Greenwich Mean Time, otherwise as local time.&nbsp; 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.&nbsp; 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.&nbsp; The default is
    <code><b>dateTimeMentry</b></code>.&nbsp; 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 &amp; 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).&nbsp; 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.&nbsp; The value returned by this command (a clock value in seconds






|







 







|
|
|
|









|
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
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
  <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>
................................................................................
    <code><b>mentry::dateTimeMentry</b></code> command from the Mentry (or
    Mentry_tile) package for interactive cell editing in tablelist
    widgets.&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; The default is
    <code><b>dateTimeMentry</b></code>.&nbsp; 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).&nbsp; 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.&nbsp; 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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>






|







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
16
17
18
19
20
21
22
23
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
...
217
218
219
220
221
222
223



224
225
226
227
228
229
230
...
388
389
390
391
392
393
394



395
396
397
398
399
400
401
...
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
....
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
....
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543










1544
1545
1546
1547
1548
1549
1550
....
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
....
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
....
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
....
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
....
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616




2617
2618









2619
2620
2621
2622
2623
2624
2625
....
2841
2842
2843
2844
2845
2846
2847
2848
2849

2850
2851
2852
2853


2854
2855
2856

2857
2858
2859
2860
2861
2862
2863
....
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887

2888
2889
2890
2891
2892


2893
2894

2895
2896
2897
2898
2899
2900
2901
....
3220
3221
3222
3223
3224
3225
3226

3227
3228
3229
3230
3231
3232
3233
....
3486
3487
3488
3489
3490
3491
3492






































3493
3494
3495
3496
3497
3498
3499
....
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
....
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
....
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
....
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
....
4742
4743
4744
4745
4746
4747
4748


4749
4750
4751
4752
4753
4754
4755
....
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767


4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
....
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
....
5680
5681
5682
5683
5684
5685
5686






5687
5688
5689
5690
5691
5692
5693
....
5756
5757
5758
5759
5760
5761
5762






5763
5764
5765
5766
5767
5768
5769
....
6033
6034
6035
6036
6037
6038
6039

6040
6041
6042
6043
6044
6045
6046
....
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
....
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
....
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
....
7472
7473
7474
7475
7476
7477
7478
7479



7480
7481
7482
7483
7484
7485
7486
....
7531
7532
7533
7534
7535
7536
7537
7538



7539
7540
7541
7542
7543
7544
7545
....
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
....
8916
8917
8918
8919
8920
8921
8922































8923
8924
8925
8926
8927
8928
8929
....
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
....
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
.....
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
.....
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
.....
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
.....
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
.....
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
.....
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
.....
11967
11968
11969
11970
11971
11972
11973


















































11974
11975
11976
11977
11978
11979
11980
  <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.5</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
................................................................................

    <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>lines</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>

................................................................................
    <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>

................................................................................
    <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>

................................................................................
    <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 &amp; 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>
................................................................................
    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.&nbsp; The Tablelist package provides a great
    variety of tree styles controlling the look &amp; feel of that column, and
    chooses the correct default style depending on the windowing system,
    operating system version, and tile theme.&nbsp; 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.&nbsp; 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>
................................................................................
    <code><b>-highlightthickness</b></code> options are only supported by the
    Tablelist package, but not by Tablelist_tile.&nbsp; 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:</b>&nbsp; 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.&nbsp; This minor
    restriction has technical reasons and is only relevant on X11.</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>
................................................................................
        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 &amp;&amp; $targetRow &lt; $rowCount}]
}
</pre>
        </blockquote>
      </blockquote>
    </dd>

    <dd id="activestyle">
................................................................................
        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="124"></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).&nbsp; 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.&nbsp; When supported, <code><b>photo7x7</b></code>
................................................................................

      <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.&nbsp; The default is <code>1</code>, meaning that
        automatic scrolling will be in effect, just like in the case of the Tk
        listbox widget.&nbsp; However, when using the TkDND package or some
        other drag &amp; 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>&nbsp; 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&nbsp; <code><b>tkdnd::drag_source register</b></code>&nbsp; or the
................................................................................

          <td><code><b>&nbsp;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 &amp; drop implementation other
        than TkDND and the drag &amp; drop framework included in BWidget.&nbsp;
        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.&nbsp; The default is
        <code>0</code>.</p>
      </blockquote>
    </dd>

................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;Height</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>Specifies the desired height for the window, in units of characters
        in the font given by the <code><b>-font</b></code> option.&nbsp; This
        is at the same time the desired height in lines, provided that no
        column-, row-, or cell-specific fonts, multi-line elements, or embedded
        images or windows will make the height of any of the rows different
        from the one corresponding to the above-mentioned font.&nbsp; With this
        restriction, if the option's value is zero or less, then the window's




        height is made just large enough to hold all the items in the tablelist
        widget.</p>









      </blockquote>
    </dd>

    <dd id="incrarrowtype">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>
................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;LabelCommand</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>Specifies the Tcl command to be invoked when mouse button 1 is
        pressed over one of the header labels and later released over the same

        label.&nbsp; When the <code><b>&lt;ButtonRelease-1&gt;</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.&nbsp; 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.&nbsp; 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">
................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;LabelCommand2</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>Specifies the 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.&nbsp; When the

        <code><b>&lt;ButtonRelease-1&gt;</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.&nbsp; 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.&nbsp; 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>

................................................................................
          <td><code><b>&nbsp;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.&nbsp; See the

        <a href="#body_bindings">DEFAULT AND INDIVIDUAL BINDINGS FOR THE
        TABLELIST BODY</a> section below for information on moving a row
        interactively.&nbsp; The default value is <code>0</code>.</p>

        <p><b>REMARK:</b>&nbsp; The support for moving a row is restricted to
        the widget's body component.&nbsp; Moving of header rows is not
        supported.</p>
................................................................................
        resizing.&nbsp; 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:&nbsp;</td>

          <td><code><b>-selectmode</b></code></td>
................................................................................
        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 &gt;= 0 &amp;&amp; [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
        ($row &lt;  0 &amp;&amp; [$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 &gt;= 0 &amp;&amp; [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
            ($row &lt;  0 &amp;&amp; [$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]} {
................................................................................
        <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 &gt;= 0 &amp;&amp; [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
        ($row &lt;  0 &amp;&amp; [$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 &gt;= 0 &amp;&amp; [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
            ($row &lt;  0 &amp;&amp; [$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]} {
................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;TreeStyle</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>Specifies the look &amp; feel of the column containing the
        indentations and expand/collapse controls in the body of a a tablelist
        used as a tree widget.&nbsp; 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.&nbsp; The currently supported
        values are shown at a glance in the two tables below:</p>

        <p>Tree styles for native look &amp; feel:</p>

        <table border="2" cellspacing="0" cellpadding="3" rules="groups">
          <colgroup></colgroup>

          <colgroup></colgroup>

          <colgroup></colgroup>
................................................................................

              <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>

              <td><img src="aqua.png" alt="aqua" width="120" height="54"></td>
            </tr>

            <tr>


              <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>

              <th><code>aqua</code></th>
            </tr>
          </tbody>

          <tbody align="center">
            <tr>
              <td><img src="ambiance.png" alt="ambiance" width="120" height=
              "63"></td>
................................................................................
        <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>vistaAero</b></code>, <code><b>win7Aero</b></code>,
        <code><b>win10</b></code>, <code><b>aqua</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.&nbsp; Otherwise (i.e., for the other tree styles or in the
        absence of PNG support) GIF images are used for the expand/collapse
................................................................................
          Instead, the event will be redirected to the widget container or the
          toplevel widget with the aid of the&nbsp; <code><b>event
          generate</b></code>&nbsp; command.&nbsp; 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:&nbsp;</td>
................................................................................
          Instead, the event will be redirected to the widget container or the
          toplevel widget with the aid of the&nbsp; <code><b>event
          generate</b></code>&nbsp; command.&nbsp; 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=
................................................................................
        <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.&nbsp; 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.&nbsp; They
        override the options of the same names set at widget level if the
        specified value is not empty.&nbsp; If one of these options hasn't been
................................................................................
    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.&nbsp; 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 &amp; DROP
    SUPPORT</b></dt>

    <dd>As <a href="#global_drag_and_drop">described in detail</a> in the
    "DEFAULT AND INDIVIDUAL BINDINGS FOR THE TABLELIST BODY" 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&nbsp; <code><b>tkdnd::drag_source register</b></code>&nbsp; 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&nbsp; <code><b>tkdnd::drop_target
    register</b></code>&nbsp; command.&nbsp; Similarly, you can register the
    body component of a tablelist widget as a drop target for the drag &amp;
    drop framework included in BWidget, with the aid of the
    <code><b>DropSite::register</b></code> command.&nbsp; (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).&nbsp; For example,
................................................................................
    return $action
}
</pre>
      </blockquote>
    </dd>

    <dd>
      <b>BWidget EXAMPLE:</b>&nbsp; For an introduction to drag &amp; drop with
      BWidget see the online tutorial <a href=
      "http://wiki.tcl.tk/16126">BWidget example: Drag and Drop Demo</a> by
      Kevin Walzer.&nbsp; The <code><b>DropSite::*</b></code> commands used in
      the following example are described in the "DropSite" reference page
      included in the BWidget distribution.&nbsp; When using this drag &amp;
      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

................................................................................
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>]] &amp;&amp;
            ![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>
        }
    }

................................................................................
        </tr>

        <tr valign="top">
          <td>
          <code><b>&lt;&lt;TablelistHeaderHeightChanged&gt;&gt;</b></code></td>

          <td>Generated whenever the (requested) height of the tablelist's
          header changes.</td>




          <td>The (requested) height of the tablelist's header.</td>
        </tr>

        <tr valign="top">
          <td>
          <code><b>&lt;&lt;TablelistRowHiddenStateChanged&gt;&gt;</b></code></td>
................................................................................
          <td>Not used.</td>
        </tr>

        <tr valign="top">
          <td><code><b>&lt;&lt;TablelistTitleColsWidthChanged&gt;&gt;</b></code></td>

          <td>Generated whenever the total width of the non-hidden title
          columns changes.</td>




          <td>The total width of the non-hidden title columns.</td>
        </tr>

        <tr valign="top">
          <td><code><b>&lt;&lt;TablelistViewUpdated&gt;&gt;</b></code></td>

................................................................................
        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>&nbsp; This subcommand enables you to manage the
          vertical scrollbar (if any) to appear below the tablelist widget's
          header, thus respecting the native look &amp; feel on Mac OS X Aqua
          and on many modern Linux systems.&nbsp; 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
................................................................................
            <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
................................................................................
        <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.&nbsp; 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 &amp;
        drop operation for which the tablelist widget (or its body component)
        was registered as a drop target.&nbsp; See the <a href=
        "#drag_and_drop_support">DRAG &amp; 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>
................................................................................
bind [.tbl <a href=
"#bodytag">bodytag</a>] &lt;Button-1&gt; {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 &gt;= 0 &amp;&amp; $col &gt;= 0 &amp;&amp;
        [string compare $w [$tbl <span>imagelabelpath</span> $cellIdx]] == 0} {
        puts "clicked the image of cell $cellIdx"
    }
}
</pre>
          </blockquote>
        </dd>
................................................................................
        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.&nbsp; 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 &amp;
        drop operation for which the tablelist widget (or its body component)
        was registered as a drop target.&nbsp; See the <a href=
        "#drag_and_drop_support">DRAG &amp; 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>
................................................................................
        respectively.&nbsp; 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&nbsp;
        <code>{<b>inside</b> -1}</code>.&nbsp; 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 &amp;
        drop operation for which the tablelist widget (or its body component)
        was registered as a drop target.&nbsp; See the <a href=
        "#drag_and_drop_support">DRAG &amp; 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=
................................................................................
    <code><b>&lt;&lt;ListboxSelect&gt;&gt;</b></code>.&nbsp; Instead of this
    event (which is supported for compatibility reasons), the virtual event
    <code><b>&lt;&lt;TablelistSelect&gt;&gt;</b></code> can be used to be made
    aware of any changes to tablelist selection.&nbsp; Both events will be
    generated independently of the selection type.</dd>

    <dd class="tm" id="local_drag_and_drop">
      <b>LOCAL DRAG &amp; DROP:</b>&nbsp; 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.&nbsp; 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.&nbsp; This <b>local drag &amp; drop</b> operation ends when mouse
        button 1 is released, and can be canceled by pressing the
        <code>Escape</code> key.&nbsp; In both cases, the mouse cursor is reset
        to its original value, specified by the <code><b>-cursor</b></code>
        configuration option.&nbsp; 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>&lt;&lt;TablelistRowMoved&gt;&gt;</b></code> is
................................................................................
        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 &amp; drop, there can be a corresponding potential target
        row or not.&nbsp; 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).&nbsp; 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.&nbsp; 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.&nbsp; Likewise, if the
................................................................................
        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).&nbsp; 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
        &amp; 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 &amp; DROP:</b>&nbsp; Besides the local drag &amp; drop, the default
    bindings also support the TkDND compiled extension and the drag &amp; drop
    framework included in BWidget, as well as custom drag &amp; drop
    implementations.&nbsp; 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&nbsp; <code><b>tkdnd::drag_source register</b></code>&nbsp; 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.&nbsp; 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>
................................................................................
        <code><b>&lt;&lt;TablelistColumnResized&gt;&gt;</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.&nbsp; 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






|







 







|







 







>
>
>







 







>
>
>







 







|







 







|







 







|




>
>
>
>
>
>
>
>
>
>







 







|







 







|







 







|
|







 







|
|
|







 







|
|
|
|
|
|
|
>
>
>
>
|
|
>
>
>
>
>
>
>
>
>







 







|
|
>
|
|
|
|
>
>
|
|
|
>







 







|
|
|
>



|
|
>
>
|
|
>







 







>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|

|







 







|

|







 







|

|













|

|







 







|
|
|
|
|
|
|

|







 







>
>







 







<
<



>
>









<
<







 







|
|







 







>
>
>
>
>
>







 







>
>
>
>
>
>







 







>







 







|
<


|
|
|
|








|
|







 







|




|
|
|







 







|







 







|
>
>
>







 







|
>
>
>







 







|
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|
|
|
|







 







|







 







|
|
|
|
|







 







|
|
|
|
|







 







|
|







 







|







 







|
|
|
|
|
|
|
|
|
|
|
|
|







 







|
|
|
|




|
|
|
|
|
|
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
...
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
...
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
...
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
....
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
....
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
....
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
....
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
....
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
....
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
....
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
....
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
....
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
....
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
....
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
....
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
....
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
....
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
....
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
....
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
....
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
....
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
....
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
....
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
....
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
....
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
....
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
....
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
....
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
....
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
....
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
....
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
.....
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
.....
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
.....
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
.....
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
.....
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
.....
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
  <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>
................................................................................

    <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>

................................................................................
    <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>

................................................................................
    <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>

................................................................................
    <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>
................................................................................
    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.&nbsp; 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.&nbsp; 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.&nbsp; 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>
................................................................................
    <code><b>-highlightthickness</b></code> options are only supported by the
    Tablelist package, but not by Tablelist_tile.&nbsp; 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>&nbsp; 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.&nbsp; This minor
    restriction has technical reasons and is only relevant on X11.</dd>

    <dd class="tm"><b>REMARK 2:</b>&nbsp; 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>
................................................................................
        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 &lt; $rowCount}]
}
</pre>
        </blockquote>
      </blockquote>
    </dd>

    <dd id="activestyle">
................................................................................
        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).&nbsp; 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.&nbsp; When supported, <code><b>photo7x7</b></code>
................................................................................

      <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.&nbsp; The default is <code>1</code>, meaning that
        automatic scrolling will be in effect, just like in the case of the Tk
        listbox widget.&nbsp; 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>&nbsp; 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&nbsp; <code><b>tkdnd::drag_source register</b></code>&nbsp; or the
................................................................................

          <td><code><b>&nbsp;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.&nbsp; 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.&nbsp; The default is
        <code>0</code>.</p>
      </blockquote>
    </dd>

................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;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.&nbsp; 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.&nbsp; 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>&nbsp; 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.&nbsp;
        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:&nbsp;</td>
................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;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.&nbsp; Provided that the option's value is a nonempty string,
        when the <code><b>&lt;ButtonRelease-1&gt;</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.&nbsp; 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.&nbsp; 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.&nbsp; 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">
................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;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.&nbsp; Provided that the
        option's value is a nonempty string, when the
        <code><b>&lt;ButtonRelease-1&gt;</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.&nbsp; 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.&nbsp; 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.&nbsp; 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>

................................................................................
          <td><code><b>&nbsp;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.&nbsp; 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.&nbsp; The default value is <code>0</code>.</p>

        <p><b>REMARK:</b>&nbsp; The support for moving a row is restricted to
        the widget's body component.&nbsp; Moving of header rows is not
        supported.</p>
................................................................................
        resizing.&nbsp; 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:&nbsp;</td>

          <td><code><b>-selectfiltercommand</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;selectFilterCommand</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;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>.&nbsp; 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.&nbsp; 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.&nbsp; 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:&nbsp;</td>

          <td><code><b>-selectmode</b></code></td>
................................................................................
        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 &gt;= 0 && [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
        ($row &lt;  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 &gt;= 0 && [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
            ($row &lt;  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]} {
................................................................................
        <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 &gt;= 0 && [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
        ($row &lt;  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 &gt;= 0 && [$tbl <a href=
"#iselemsnipped">iselemsnipped</a> $row,$col fullText]) ||
            ($row &lt;  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]} {
................................................................................
          <td>Database Class:</td>

          <td><code><b>&nbsp;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.&nbsp; 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.&nbsp; 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>
................................................................................

              <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>
................................................................................
        <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.&nbsp; Otherwise (i.e., for the other tree styles or in the
        absence of PNG support) GIF images are used for the expand/collapse
................................................................................
          Instead, the event will be redirected to the widget container or the
          toplevel widget with the aid of the&nbsp; <code><b>event
          generate</b></code>&nbsp; command.&nbsp; 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>&nbsp; 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:&nbsp;</td>
................................................................................
          Instead, the event will be redirected to the widget container or the
          toplevel widget with the aid of the&nbsp; <code><b>event
          generate</b></code>&nbsp; command.&nbsp; 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>&nbsp; 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=
................................................................................
        <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.&nbsp; 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.&nbsp; They
        override the options of the same names set at widget level if the
        specified value is not empty.&nbsp; If one of these options hasn't been
................................................................................
    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.&nbsp; 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&nbsp; <code><b>tkdnd::drag_source register</b></code>&nbsp; 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&nbsp; <code><b>tkdnd::drop_target
    register</b></code>&nbsp; command.&nbsp; 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.&nbsp; (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).&nbsp; For example,
................................................................................
    return $action
}
</pre>
      </blockquote>
    </dd>

    <dd>
      <b>BWidget EXAMPLE:</b>&nbsp; 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.&nbsp; The <code><b>DropSite::*</b></code> commands used in
      the following example are described in the "DropSite" reference page
      included in the BWidget distribution.&nbsp; 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

................................................................................
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>
        }
    }

................................................................................
        </tr>

        <tr valign="top">
          <td>
          <code><b>&lt;&lt;TablelistHeaderHeightChanged&gt;&gt;</b></code></td>

          <td>Generated whenever the (requested) height of the tablelist's
          header changes.&nbsp; 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>&lt;&lt;TablelistRowHiddenStateChanged&gt;&gt;</b></code></td>
................................................................................
          <td>Not used.</td>
        </tr>

        <tr valign="top">
          <td><code><b>&lt;&lt;TablelistTitleColsWidthChanged&gt;&gt;</b></code></td>

          <td>Generated whenever the total width of the non-hidden title
          columns changes.&nbsp; 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>&lt;&lt;TablelistViewUpdated&gt;&gt;</b></code></td>

................................................................................
        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>&nbsp; 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.&nbsp; 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
................................................................................
            <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>&nbsp; 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.&nbsp; It
          supports both static and dynamic scrollbars and respects the header
          component and title columns of tablelist widgets.&nbsp; 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
................................................................................
        <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.&nbsp; 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.&nbsp; 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>
................................................................................
bind [.tbl <a href=
"#bodytag">bodytag</a>] &lt;Button-1&gt; {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 &gt;= 0 && $col &gt;= 0 &&
        [string compare $w [$tbl <span>imagelabelpath</span> $cellIdx]] == 0} {
        puts "clicked the image of cell $cellIdx"
    }
}
</pre>
          </blockquote>
        </dd>
................................................................................
        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.&nbsp; 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.&nbsp; 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>
................................................................................
        respectively.&nbsp; 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&nbsp;
        <code>{<b>inside</b> -1}</code>.&nbsp; 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.&nbsp; 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=
................................................................................
    <code><b>&lt;&lt;ListboxSelect&gt;&gt;</b></code>.&nbsp; Instead of this
    event (which is supported for compatibility reasons), the virtual event
    <code><b>&lt;&lt;TablelistSelect&gt;&gt;</b></code> can be used to be made
    aware of any changes to tablelist selection.&nbsp; Both events will be
    generated independently of the selection type.</dd>

    <dd class="tm" id="local_drag_and_drop">
      <b>LOCAL DRAG & DROP:</b>&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; In both cases, the mouse cursor is reset
        to its original value, specified by the <code><b>-cursor</b></code>
        configuration option.&nbsp; 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>&lt;&lt;TablelistRowMoved&gt;&gt;</b></code> is
................................................................................
        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.&nbsp; 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).&nbsp; 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.&nbsp; 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.&nbsp; Likewise, if the
................................................................................
        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).&nbsp; 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>&nbsp; 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.&nbsp; 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&nbsp;
    <code><b>tkdnd::drag_source register</b></code>&nbsp; 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.&nbsp; 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>
................................................................................
        <code><b>&lt;&lt;TablelistColumnResized&gt;&gt;</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.&nbsp; 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>&nbsp; If the selection type is <code><b>cell</b></code> then
    a few further bindings apply to the header labels.&nbsp; 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>.&nbsp; Notice also that
    you can restrict the set of cells that will be selected when these bindings
    perform a column-wise cell selection:&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; The selection state of other cells
        is not changed.&nbsp; 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