Tk Library Source Code
Check-in [2bd15d69a4]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: * CHANGES.txt: Updated to reflect the changes. * doc/*.html:
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:2bd15d69a4a000b2a8378c23e109ff8135ff0c2df9d4072dedfc06355029039c
User & Date: csaba 2020-06-23 09:14:41
Context
2020-06-23
09:17
* scripts/*.tcl: Made the variable "tablelist::scalingpct" read-only; automatic scaling of the default arrow style on the windowing system "x11" and for a few tile themes; made sure that the widgets used for interactive cell editing will appear properly scaled. check-in: 06484d736e user: csaba tags: trunk
09:14
* CHANGES.txt: Updated to reflect the changes. * doc/*.html: check-in: 2bd15d69a4 user: csaba tags: trunk
09:13
* *.tcl: Bumped the version number to 6.10. * COPYRIGHT.txt: * README.txt: check-in: adcd21e30e user: csaba tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/tablelist/CHANGES.txt.

1
2







































3
4
5
6
7
8
9
What is new in Tablelist 6.9?
-----------------------------








































1. Significantly extended and improved the code for initializing the
   variable "tablelist::scalingpct", especially on X11, including GNOME
   and KDE on both Xorg and Wayland, Solus and Ubuntu Budgie, Cinnamon,
   MATE, and Xfce.  This variable now has the additional value 175.  See
   the new section "More on tablelist::scalingpct" in Tablelist
   Programmer's Guide for details.
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
What is new in Tablelist 6.10?
------------------------------

1. Made the variable "tablelist::scalingpct" read-only.

2. Extended the initialization of the variable "tablelist::scalingpct"
   by scaling: (a) the default width of the Tk core scrollbars on X11;
   (b) for the built-in themes "alt", "clam", "classic", and "default",
   the default width of the ttk::scrollbar widget, as well as the arrows
   of the ttk::combobox and ttk::spinbox widgets; (c) for the "alt" and
   "clam" themes, the arrow of the ttk::menubutton widget; (d) for the
   "clam", "classic", and "default" themes, the indicators of the
   ttk::checkbutton and ttk::radiobutton widgets.

3. Made sure that in the "vista" and "xpnative" themes the indicators of
   the ttk::checkbutton and ttk::radiobutton widgets will be properly
   scaled, regardless of the Tk release being used (a long-standing bug
   in the implementation of these widgets was fixed in May 2020).

4. Automatic scaling of the default arrow style on the windowing system
   "x11" and for a few tile themes, like "alt", "clam", and "default":
   Now the default value of the "-arrowstyle" option can be, besides
   "flat8x4", one of "flat9x5", "flat11x6", "flat13x7", and "flat15x8",
   depending on the value of the variable "tablelist::scalingpct".

5. The temporarily embedded widgets used for interactive cell editing
   now will appear properly scaled, thanks to additional improvements
   related to the editing with the aid of Tk core checkbutton, BWidget
   SpinBox, BWidget ComboBox, iwidgets::dateentry, iwidgets::timeentry,
   iwidgets::combobox, and Oakley combobox widgets.  A tile widget used
   for cell editing will be properly scaled in all built-in themes; the
   only exception is ttk::checkbutton, which cannot be scaled if the
   theme is "alt" or "winnative".

6. Made all demo-scripts fully scaling-aware.

7. Several further improvements in the code and documentation, as well
   as minor bug fixes.

What was new in Tablelist 6.9?
------------------------------

1. Significantly extended and improved the code for initializing the
   variable "tablelist::scalingpct", especially on X11, including GNOME
   and KDE on both Xorg and Wayland, Solus and Ubuntu Budgie, Cinnamon,
   MATE, and Xfce.  This variable now has the additional value 175.  See
   the new section "More on tablelist::scalingpct" in Tablelist
   Programmer's Guide for details.

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
20
<!DOCTYPE html>
<html>
<head>
  <title>The Multi-Column Listbox and Tree Widget Package Tablelist 6.9</title>


  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content=
  "tablelist, multi-column, listbox, tree, widget, tile">
</head>

<body>
  <div align="center">
    <h1>The Multi-Column Listbox and Tree Widget Package Tablelist 6.9</h1>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>



|
>








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
<head>
  <title>The Multi-Column Listbox and Tree Widget Package Tablelist
  6.10</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content=
  "tablelist, multi-column, listbox, tree, widget, tile">
</head>

<body>
  <div align="center">
    <h1>The Multi-Column Listbox and Tree Widget Package Tablelist 6.10</h1>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>

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

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
...
172
173
174
175
176
177
178
179
180
181
182

183
184
185
186
187
188
189
...
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
...
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
...
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
...
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
...
407
408
409
410
411
412
413
414
415
416
417

418
419
420
421
422
423
424

425
426
427
428
429
430
431
...
442
443
444
445
446
447
448





449
450
451
452
453
454
455
...
459
460
461
462
463
464
465




























466
467
468
469
470
471
472
...
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
...
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
...
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
...
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
....
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
....
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146

1147
1148
1149
1150
1151
1152
1153


1154










1155
1156
1157
1158
1159
1160
1161
....
1202
1203
1204
1205
1206
1207
1208









1209
1210
1211
1212
1213
1214
1215
....
1302
1303
1304
1305
1306
1307
1308
1309









1310
1311
1312
1313
1314
1315
1316

1317
1318
1319
1320
1321
1322
1323
....
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
....
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
....
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
....
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853

1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880

1881
1882
1883
1884
1885
1886
1887
....
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
....
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201






2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
....
2265
2266
2267
2268
2269
2270
2271
2272


2273
2274
2275
2276
2277
2278







2279
2280
2281
2282
2283
2284
2285
....
2524
2525
2526
2527
2528
2529
2530
2531

2532
2533
2534
2535
2536
2537
2538
....
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
....
2563
2564
2565
2566
2567
2568
2569

2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
....
2624
2625
2626
2627
2628
2629
2630




2631
2632
2633
2634
2635
2636
2637
....
2659
2660
2661
2662
2663
2664
2665

2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685



2686
2687
2688
2689
2690
2691
2692
2693
2694
2695

2696
2697

2698
2699
2700
2701
2702
2703
2704
....
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
....
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Tablelist Programmer's Guide</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................

  <h4><a href="#examples">Examples</a></h4>

  <ul>
    <li><a href="#ex_config">A tablelist Widget for Displaying and Editing
    Configuration Options</a></li>

    <li><a href="#ex_browse">Two Widget Browsers Based on a tablelist</a></li>


    <li><a href="#ex_dirViewer">A Scalable 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>

    <li><a href="#ex_tile">Tile-Based Demo Scripts</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
................................................................................
      <a href="https://www.nemethi.de">https://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.9.tar.gz</code> for UNIX and
  <code>tablelist6_9.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 href="https://core.tcl.tk/tklib">https://core.tcl.tk/tklib</a>
    </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.9.tar.gz</code>:</p>

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

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

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

  <p>Both commands will create a directory named <code>tablelist6.9</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_9.zip</code> into the directory
  <code>tablelist6.9</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.9, then it is highly
  recommended to specify the version number <code>6.9</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.9</code>,&nbsp; and their
  tile-based counterparts invoke the command&nbsp; <code>package require
  tablelist_tile 6.9</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>?
................................................................................
  <ul>
    <li>The variable <code>tablelist::version</code> holds the current version
    number of the Tablelist and Tablelist_tile packages.</li>

    <li>The variable <code>tablelist::library</code> holds the location of the
    Tablelist installation directory.</li>

    <li>The variable <code>tablelist::scalingpct</code> holds the scaling
    percentage corresponding to the display's DPI scaling level.&nbsp;
    Tablelist adapts the default sort arrow style on Windows Vista, 7, 8, and
    10, as well as the sizes of the tree styles <code>vistaAero</code>,
    <code>vistaClassic</code>, <code>win7Aero</code>, <code>win7Classic</code>,
    and <code>win10</code> to the value of this variable.&nbsp; The currently
    supported values are <code>100</code>, <code>125</code>, <code>150</code>,
    <code>175</code>, and <code>200</code>.&nbsp; You can use this variable on
    all platforms, e.g., if you want to create images of different sizes,
................................................................................
  <h3 id="ov_scaling">More on <code>tablelist::scalingpct</code></h3>

  <p>The way Tablelist initializes the variable
  <code>tablelist::scalingpct</code> depends on the windowing system:</p>

  <p><i>On Windows and Mac OS X Aqua</i> the scaling percentage is computed
  from&nbsp; <code>[tk scaling]</code>.&nbsp; Note that on Mac OS X the result
  is always <code>100</code>, regardless of the display's scaling level, hence
  there is no need for scaling-dependent sizes for the sort arrow, tree style,
  or images.&nbsp; On Mac OS X Aqua the desktop engine automatically scales
  everything as needed.</p>

  <p><i>On X11</i>, computing the scaling percentage from&nbsp; <code>[tk
  scaling]</code>&nbsp; is done as fallback method only, because the
  implementation of display scaling is highly dependent on the desktop
  environment and it mostly manipulates system resources that are resident
  outside of Xlib, which Tk is based on.&nbsp; (Traditional X applications like
  <code>bitmap</code> and <code>xmag</code> are also affected by this.)&nbsp;
................................................................................

  <ul>
    <li class="tm">On <i>Xfce and MATE</i> the display scaling mode can be
    either unscaled (1x, normal) or scaled (2x, HiDPI), and the variable
    <code>tablelist::scalingpct</code> will be set accordingly to
    <code>100</code> or <code>200</code>.</li>

    <li class="tm">In case of <i>GNOME on Xorg, Budgie, and Cinnamon</i>, the
    display scaling can be either 100 % or 200 %, and Tablelist sets the
    variable <code>tablelist::scalingpct</code> accordingly to <code>100</code>
    or <code>200</code>.&nbsp; In newer GNOME and Budgie versions on Ubuntu one

    can enable the <code>x11-randr-fractional-scaling</code> as experimental
    feature, which adds 125 %, 150 %, and 175 % to the list of supported
    scaling percentages.&nbsp; Note that, due to the way this fractional
    scaling is implemented, if the display scaling was set to one of these
    intermediate levels, the value of <code>tablelist::scalingpct</code> will
    be <code>200</code>.&nbsp; Support for fractional scaling was also
    announced for the next Cinnamon version 4.6.</li>


    <li class="tm"><i>GNOME on Wayland</i> traditionally supports the display
    scaling values 100 % and 200 %, and the variable
    <code>tablelist::scalingpct</code> will be set accordingly to
    <code>100</code> or <code>200</code>.&nbsp; In newer GNOME versions one can
    enable the experimental feature <code>scale-monitor-framebuffer</code>,
    which adds 125 %, 150 %, and 175 % to the list of supported scaling
................................................................................
    display's scaling level.</li>

    <li class="tm"><i>KDE Plasma on Wayland</i> supports fractional scaling,
    too.&nbsp; In this case, the value of the variable
    <code>tablelist::scalingpct</code> will always be <code>100</code>,
    regardless of the display's scaling level.</li>
  </ul>






  <p>When initializing the variable <code>tablelist::scalingpct</code> on X11,
  Tablelist also corrects the sizes of the standard fonts if needed.&nbsp;
  These fonts (<code>TkDefaultFont</code>, <code>TkTextFont</code>, etc.) are
  defined in the file <code>$tk_library/ttk/fonts.tcl</code>.&nbsp; For quite a
  long time, the font sizes for X11 given in this file were sizes in pixels,
  which was not suitable for use on HiDPI displays.&nbsp; This caused several
................................................................................
  that, regardless of the Tk version, the font sizes will suit the display's
  scaling level, Tablelist examines this library file and, if the latter
  contains sizes in pixels, then it sets the <code>-size</code> option of the
  standard fonts to corresponding sizes in points (without altering the
  file).&nbsp; In addition, for the HiDPI mode on Xfce and MATE, Tablelist
  doubles the sizes (in points) of the standard fonts (the way display scaling
  works on these desktops makes this necessary).</p>





























  <h3 id="ov_tile">More on Tablelist_tile</h3>

  <p>A tablelist widget consists of a body (containing the items) and a header
  (displaying the column titles and optional header items).&nbsp; Both
  components are contained in a hull, implemented as a frame.&nbsp; The header
  has a rather complex structure, consisting, among others, of frame and label
................................................................................
      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.9
source [file join $tablelist::library demos config.tcl]
</pre>
      </blockquote>
    </li>
  </ul>

  <p>In both cases, the script will print the following message to
................................................................................
  </blockquote>

  <p>then another toplevel window containing the tablelist widget
  <code>.configTop2.tf.tbl</code> will pop up.&nbsp; The latter looks like in
  the following figure:</p>

  <blockquote>
    <img src="config.png" alt="Configuration Options" width="835" height="402">
  </blockquote>

  <p>It is assumed that the Tcl command associated with the widget specified by
  <code>&lt;widgetName&gt;</code> has a <code>configure</code> subcommand
  which, when invoked without any argument, returns a list describing all of
  the available configuration options for the widget, in the common format
  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.9

namespace eval demo {
    <span class="cmt">#
    # 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:
    #
................................................................................
    } else {
        grid [$tbl cornerpath] -row 0 -column 1 -sticky ew
        grid $vsb              -row 1 -column 1 -sticky ns
    }
    grid $hsb -row 2 -column 0 -sticky ew
    grid rowconfigure    $tf 1 -weight 1
    grid columnconfigure $tf 0 -weight 1
    pack $b1 $b2 $b3 -side left -expand yes -pady 10
    pack $bf -side bottom -fill x
    pack $tf -side top -expand yes -fill both

    <span class="cmt">#
    # Populate the tablelist with the configuration options of the given widget
    #</span>
    putConfig $w $tbl
................................................................................
  "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>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# demo::putConfig
#
# Outputs the configuration options of the widget w into the tablelist widget
................................................................................
  is given by the <code>cget</code> subcommand of the Tcl command associated
  with that widget.&nbsp; For example, a boolean value will always be replaced
  with <code>1</code> or <code>0</code>, even if the entry contains the string
  <code>yes</code> or <code>no</code>.&nbsp; The procedure returns this
  canonical option value, thus making sure that the latter will become the new
  content of the cell that was just edited.</p>

  <h3 id="ex_browse">Two Widget Browsers Based on a tablelist</h3>

  <p>The files <code>browse.tcl</code> and <code>browseTree.tcl</code> in the
  <code>demos</code> directory contain a procedure
  <code>demo::displayChildren</code> that displays information about the
  children of an arbitrary widget in a tablelist contained in a newly created
  toplevel widget.&nbsp; To test it, start <code>wish</code> and evaluate the
  chosen file by using the <code>source</code> command, in a similar way as in
................................................................................
  in a new toplevel window is created and its name is printed to
  <code>stdout</code>.</p>

  <p>The tablelist created by the procedure <code>demo::displayChildren</code>
  in the file <code>browse.tcl</code> is a multi-column listbox:</p>

  <blockquote>
    <img src="browse.png" alt="Widget Browser" width="605" height="299">
  </blockquote>

  <p>The tablelist created by the procedure of the same name in the file
  <code>browseTree.tcl</code> is a multi-column tree widget:</p>

  <blockquote>
    <img src="browseTree.png" alt="Widget Browser" width="619" height="299">
  </blockquote>

  <p>The <code>demo::displayChildren</code> command inserts some data of the
  children of the widget specified by <code>&lt;widgetName&gt;</code> into a
  vertically scrolled tablelist with 9 dynamic-width columns and interactive
  sort capability, and returns the name of the newly created tablelist
  widget.&nbsp; By double-clicking an item (e.g., the one containing the path
  name <code>.browseTop</code> in <code>browse.tcl</code> and the name
  <code>browseTop</code> in <code>browseTree.tcl</code>) or invoking the first
  entry of a pop-up menu within the body of the tablelist, you can display the
  data of the children of the widget corresponding to the selected item, and
  with the second menu entry you can display its configuration options (see the
  <a href="#ex_config">previous example</a> for details).&nbsp; To go one level
  up, click on the <b>Parent</b> button.</p>

  <p>There is a lot of code common to the scripts <code>browse.tcl</code> and
  <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.9

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

    <span class="cmt">#
    # Create two images, needed in the procedure putChildren
    #</span>

    variable leafImg [image create bitmap -file [file join $dir leaf.xbm] \
                      -background coral -foreground gray50]
    variable compImg [image create bitmap -file [file join $dir comp.xbm] \
                      -background yellow -foreground gray50]
}

source [file join $demo::dir config.tcl]













<span class="cmt">#------------------------------------------------------------------------------
# demo::displayChildren
#
# Displays information on the children of the widget w in a tablelist widget
# contained in a newly created toplevel widget.  Returns the name of the
# tablelist widget.
#------------------------------------------------------------------------------</span>
................................................................................
    foreach col {2 3 4 5} {
        $tbl columnconfigure $col -sortmode integer
    }
    foreach col {6 7} {
        $tbl columnconfigure $col -formatcommand demo::formatBoolean
    }
    scrollbar $vsb -orient vertical -command [list $tbl yview]










    <span class="cmt">#
    # When displaying the information about the children of any
    # ancestor of the label widgets, the widths of some of the
    # labels and thus also the widths and x coordinates of some
    # children may change.  For this reason, make sure the items
    # will be updated after any change in the sizes of the labels
................................................................................
  <p>The same <code>columnconfigure</code> subcommand enables us to specify
  that, when displaying the elements of columns 6 and 7 (having the titles
  <code>"Mapped"</code> and <code>"Viewable"</code>, respectively), the boolean
  values <code>1</code> and <code>0</code> will be replaced with the strings
  <code>"yes"</code> and <code>"no"</code>, returned by the
  <code>demo::formatBoolean</code> command shown below.</p>

  <p>After creating the vertical scrollbar, we iterate over the elements of the









  list containing the path names of all header labels of the tablelist widget,
  returned by the <code><a href="tablelistWidget.html#labels">labels</a></code>
  subcommand of the Tcl command corresponding to the widget.&nbsp; For each
  element of the list, we bind the procedure
  <code>demo::updateItemsDelayed</code> to the <code>&lt;Configure&gt;</code>
  event.&nbsp; In this way we make sure the procedure will be invoked whenever
  the header label indicated by that list element changes size.</p>


  <p>The four invocations of the <code>bind</code> command following the
  creation of the pop-up menu make use of a binding tag whose name depends on
  the path name of the tablelist widget and is returned by the <code><a href=
  "tablelistWidget.html#bodytag">bodytag</a></code> subcommand of the Tcl
  command associated with the tablelist widget.&nbsp; The advantage of using
  this tag instead of the path name of the tablelist's body is that this
................................................................................
        putChildren $w $tbl
    }
}
</pre>
  </blockquote>

  <p>The procedure <code>demo::refreshView</code>, associated with the
  <b>Refresh</b> button, is implemented as follows:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# demo::refreshView
#
# Redisplays the data of the children of the widget w in the tablelist widget
................................................................................

  <p>The script <code>dirViewer.tcl</code> in the <code>demos</code> directory
  displays the contents of the volumes mounted on the system (e.g., the root
  <code>/</code> on UNIX and the local drives on Windows) in a tablelist used
  as multi-column tree widget:</p>

  <blockquote>
    <img src="dirViewer.png" alt="Directory Viewer" width="675" height="456">
  </blockquote>

  <p>By double-clicking an item or invoking the single entry of a pop-up menu
  within the body of the tablelist, you can display the content of the folder
  corresponding to the selected item.&nbsp; To go one level up, click on the
  <b>Parent</b> button.</p>

  <p>There are a lot of similarities between this script and the one discussed
  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.9

<span class="cmt">#
# Add some entries to the Tk option database
#</span>
set dir [file dirname [info script]]
source [file join $dir option.tcl]

................................................................................
    $tbl columnconfigure 0 -formatcommand formatString -sortmode dictionary
    $tbl columnconfigure 1 -formatcommand formatSize -sortmode integer
    $tbl columnconfigure 2 -formatcommand formatString
    scrollbar $vsb -orient vertical   -command [list $tbl yview]
    scrollbar $hsb -orient horizontal -command [list $tbl xview]

    <span class="cmt">#
    # On X11 configure the tablelist and the scrollbars
    # according to the display's DPI scaling level
    #</span>
    global winSys                                       ;<span class="cmt"># see option.tcl</span>
    if {[string compare $winSys "x11"] == 0} {
        set pct $tablelist::scalingpct
        set arrowSizeList {7x4 9x5 11x6 13x7 15x8}
        set idx [expr {($pct - 100) / 25}]
        set arrowSize [lindex $arrowSizeList $idx]
        $tbl configure -arrowstyle flat$arrowSize -treestyle bicolor$pct

        set defaultSbWidth [lindex [$vsb configure -width] 3]
        set sbWidth [expr {$defaultSbWidth * $pct / 100}]
        $vsb configure -width $sbWidth
        $hsb configure -width $sbWidth
    }

    . . .

    <span class="cmt">#
    # Populate the tablelist with the content of the given directory
    #</span>
................................................................................
  <p>The procedure specifies a value not only for the <code><a href=
  "tablelistWidget.html#expandcommand">-expandcommand</a></code> option of the
  tablelist it creates, but also for its <code><a href=
  "tablelistWidget.html#collapsecommand">-collapsecommand</a></code>
  option.&nbsp; The latter will merely restore the image shown in the first
  column to the one displaying a closed folder (see below).</p>

  <p>In a scaling-aware application the values of the <code><a href=
  "tablelistWidget.html#arrowstyle">-arrowstyle</a></code> and <code><a href=
  "tablelistWidget.html#treestyle">-treestyle</a></code> tablelist options
  should reflect the display's DPI scaling level.&nbsp; On Windows Vista, 7, 8,
  and 10 the default values of these options already fulfill this requirement,

  and on Mac OS X Aqua the desktop engine automatically scales everything as
  needed.&nbsp; On X11 we set the <code>-arrowstyle</code> option to one of
  <code>flat7x4</code>, ..., <code>flat15x8</code>, and the
  <code>-treestyle</code> option to one of <code>bicolor100</code>, ...,
  <code>bicolor200</code>, depending on the value of the public variable
  <code>tablelist::scalingpct</code>.&nbsp; On X11 (only) we also set the
  <code>-width</code> option of both scrollbars to a value that depends on the
  DPI scaling percentage.</p>

  <p>In the tile-based version <code>dirViewer_tile.tcl</code> of this demo
  script we create both scrollbars using the <code>ttk::scrollbar</code>
  command.&nbsp; Since ttk::scrollbar widgets have no <code>-width</code>
  option, the code for scaling them makes use of the <code>ttk::style</code>
  command:</p>

  <blockquote>
    <pre>
        ttk::style theme settings default {
            set defaultSbWidth [ttk::style lookup TScrollbar -width]
        }
        set sbWidth [expr {$defaultSbWidth * $pct / 100}]
        ttk::style configure TScrollbar -arrowsize $sbWidth -width $sbWidth
</pre>
  </blockquote>

  <p>Returning to the demo script <code>dirViewer.tcl</code>, let's see how it
  populates the tablelist with the content of the given directory:</p>


  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# putContents
#
# Outputs the content of the directory dir into the tablelist widget tbl, as
................................................................................

  <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>
    <img src="styles.png" alt="Styles" width="698" height="518">
  </blockquote>

  <p>Here is the relevant code segment:</p>

  <blockquote>
    <pre>
<span class="cmt">#
................................................................................
  visual effect it produces looks nice both by itself and combined with
  horizontal or vertical stripes, created by using the <code><a href=
  "tablelistWidget.html#stripebackground">-stripebackground</a></code> option
  and the <code><a href=
  "tablelistWidget.html#columnconfigure">columnconfigure</a></code> subcommand,
  respectively.</p>

  <h3 id="ex_editing">Advanced Interactive tablelist Cell Editing</h3>

  <p>The scripts <code>tileWidgets.tcl</code>, <code>bwidget.tcl</code>,
  <code>iwidgets.tcl</code>, and <code>miscWidgets.tcl</code> in the
  <code>demos</code> directory create a tablelist widget displaying some
  parameters of 16 serial lines, and demonstrate how to use various widgets
  from the Tk core and from the packages tile, BWidget, Iwidgets, combobox (by
  Bryan Oakley), ctext, and Mentry (or Mentry_tile) for interactive cell
  editing.&nbsp; The following figure shows the tablelist widget, together with
  a BWidget ComboBox used to edit the content of one of its cells:</p>

  <blockquote>
    <img src="bwidget.png" alt="Serial Line Configuration" width="841" height=
    "409">
  </blockquote>

  <p>Here is the relevant code segment from the script <code>bwidget.tcl</code>
  (the scripts <code>tileWidgets.tcl</code>, <code>iwidgets.tcl</code>, and
  <code>miscWidgets.tcl</code> are similar).&nbsp; A few parts of the code are
  shown in <span class="red">red</span> color &ndash; we will return to this
  towards the end of the section.</p>

  <blockquote>
    <pre>
package require Tk 8.4                          ;<span class="cmt"># because of "-compound"</span>
package require tablelist 6.9
package require BWidget

wm title . "Serial Line Configuration"

<span class="cmt">#
# Add some entries to the Tk option database
#</span>
set dir [file dirname [info script]]
source [file join $dir option.tcl]
option add *Tablelist*Entry.background white







<span class="cmt">#
# Register some widgets from the BWidget package for interactive cell editing
#</span>
tablelist::addBWidgetEntry
tablelist::addBWidgetSpinBox
tablelist::addBWidgetComboBox

<span class="cmt">#
# Create the images "checkedImg" and "uncheckedImg", as well as 16 images of
# names like "img#FF0000", displaying colors identified by names like "red"
#</span>
source [file join $dir images.tcl]

<span class="cmt">#
# Create a tablelist widget with editable columns (except the first one)
#</span>
set tbl .tbl
tablelist::tablelist $tbl \
    -columns {0 "No."             right
              0 "Available"       center
................................................................................
        $clock $clock [lindex $colorNames $i]]

    <span class="red">set availImg [expr {($i &lt; 8) ? "checkedImg" : "uncheckedImg"}]
    $tbl cellconfigure end,available -image $availImg</span>
    $tbl cellconfigure end,color -image img[lindex $colorValues $i]
}

set btn [button .btn -text "Close" -command exit]



<span class="cmt">#
# Manage the widgets
#</span>
pack $btn -side bottom -pady 10
pack $tbl -side top -expand yes -fill both







</pre>
  </blockquote>

  <p>We invoke the <code><a href=
  "tablelistBWidget.html#Entry">tablelist::addBWidgetEntry</a></code>,
  <code><a href=
  "tablelistBWidget.html#SpinBox">tablelist::addBWidgetSpinBox</a></code>, and
................................................................................
  and the validation facilities specific to that library.&nbsp; The third
  script makes use of the entry, spinbox, checkbutton, and menubutton widgets
  from the Tk core, Bryan Oakley's combobox, and of the mentry widgets of type
  <code>"Date"</code> and <code>"Time"</code>, and it performs the entry
  validation with the aid of the Wcb package (which is required anyway for the
  Mentry library).</p>

  <h3 id="ex_windows">A tablelist Widget Containing Embedded Windows</h3>


  <p>The script <code>embeddedWindows.tcl</code> in the <code>demos</code>
  directory creates a tablelist widget whose items correspond to the Tk library
  scripts.&nbsp; The size of each file (in bytes) is not only displayed as a
  number, but is also illustrated with the aid of a frame with red background,
  created as a child of an embedded frame with ivory background.&nbsp; The
  files can be viewed by clicking on the corresponding embedded button
................................................................................
  widgets.</p>

  <p>The following screenshot shows the tablelist widget with the mouse cursor
  over the first header label, causing this label to appear in
  <code>active</code> state:</p>

  <blockquote>
    <img src="embeddedWindows.png" alt="Embedded Windows" width="432" height=
    "310">
  </blockquote>

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

  <blockquote>
    <pre>
package require tablelist 6.9

wm title . "Tk Library Scripts"

<span class="cmt">#
# Add some entries to the Tk option database
#</span>
set dir [file dirname [info script]]
................................................................................

<span class="cmt">#
# Create the font TkFixedFont if not yet present
#</span>
catch {font create TkFixedFont -family Courier -size -12}

<span class="cmt">#

# Create an image to be displayed in buttons embedded in a tablelist widget
#</span>
image create photo openImg -file [file join $dir open.gif]

<span class="cmt">#
# Create a vertically scrolled tablelist widget with 5
# dynamic-width columns and interactive sort capability
#</span>
set tf .tf
frame $tf -class ScrollArea
................................................................................
}
if {$tk_version &gt;= 8.5} {
    $tbl header insert 0 [list "[$tbl size] *.tcl files" "" $totalSize "" ""]
    $tbl header rowconfigure 0 -foreground blue
}
</pre>
  </blockquote>





  <p>We insert the size of each file not only into the column with the
  title&nbsp; <code>"File Size"</code>,&nbsp; but also into the column&nbsp;
  <code>"Bar Chart"</code>.&nbsp; Since we configured this column with&nbsp;
  <code>-formatcommand emptyStr</code>,&nbsp; the text will remain hidden in
  it.&nbsp; It will, however, be needed when sorting the items by that
  column.</p>
................................................................................
# file whose name is diplayed in the first column of the cell's row.
#------------------------------------------------------------------------------</span>
proc createFrame {tbl row col w} {
    <span class="cmt">#
    # Create the frame and replace the binding tag "Frame"
    # with "TablelistBody" in the list of its binding tags
    #</span>

    frame $w -width 102 -height 14 -background ivory -borderwidth 1 \
             -relief solid
    bindtags $w [lreplace [bindtags $w] 1 1 TablelistBody]

    <span class="cmt">#
    # Create the child frame and replace the binding tag "Frame"
    # with "TablelistBody" in the list of its binding tags
    #</span>
    frame $w.f -height 12 -background red -borderwidth 1 -relief raised
    bindtags $w.f [lreplace [bindtags $w] 1 1 TablelistBody]

    <span class="cmt">#
    # Manage the child frame
    #</span>
    set fileSize [$tbl cellcget $row,fileSize -text]
    place $w.f -relwidth [expr {double($fileSize) / $::maxSize}]
}
</pre>
  </blockquote>




  <p>Since the frame will be embedded into the tablelist's body, we want to
  have the same handling of the mouse events in the frame and in its child
  frame as in the rest of the tablelist's body.&nbsp; To this end we replace
  the binding tag <code>Frame</code> (which has no own bindings anyway) with
  <code><a href="tablelistWidget.html#body_bindings">TablelistBody</a></code>,
  thus making sure that the default binding scripts associated with that tag
  will be valid for the parent frame and its child, too.</p>

  <p>We <code>place</code> the red child frame within its parent using the
  <code>-relwidth</code> option, to make sure that its width will remain

  proportional to the size of the corresponding file when resizing the parent
  frame (which will happen when resizing its column, as seen below).</p>


  <p>The creation script for the buttons used for viewing the Tk library files
  is quite simple:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
................................................................................
  <span class="red">red</span> color:</p>

  <p>First, we replace the starting lines</p>

  <blockquote>
    <pre>
package require Tk 8.3                          ;<span class="cmt"># because of entry validation</span>
package require tablelist 6.9
</pre>
  </blockquote>

  <p>with</p>

  <blockquote>
    <pre>
package require tablelist<span class="red">_tile</span> 6.9
</pre>
  </blockquote>

  <p>and the command</p>

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

  <p>The tile-based version of the demo script <code><a href=
  "#ex_windows">embeddedWindows.tcl</a></code> contains a bit more changes, but
  most of them are not Tablelist-specific.&nbsp; Please take a look at the file
  <code>embeddedWindows_tile.tcl</code> in the <code>demos</code> directory for
  the details.&nbsp; Here is a screenshot of the resulting window:</p>

  <blockquote>
    <img src="embeddedWindows_tile.png" alt="Embedded Windows" width="432"
    height="316">
  </blockquote>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>
</body>
</html>







|







 







|
>







|


|







 







|
|
|
|
>







 







|



|







|



|




|
|







 







|
|



|

|







 







|
|







 







|
<
|
|







 







|
|
|
|
>
|
|
|
|
|
<
|
>







 







>
>
>
>
>







 







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







 







|







 







|













|







 







|







 







|
|







 







|







 







|






|













|









|





|

>
|
|
|
|



>
>

>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>







 







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







 







|







 







|





|









|







 







|
|



|
<
<
<
<
<
<
<
<
<







 







|
<
|

<
>

<
<
|
|
|
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
>







 







|







 







|












|











|











>
>
>
>
>
>







<
<
<
<
<
<







 







|
>
>

<
<
|
|
|
>
>
>
>
>
>
>







 







|
>







 







|
|






|







 







>
|

|







 







>
>
>
>







 







>
|







|






|




>
>
>









|
>
|
|
>







 







|







|







 







|









|
|








10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
...
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
...
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
...
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
...
385
386
387
388
389
390
391
392

393
394
395
396
397
398
399
400
401
...
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424

425
426
427
428
429
430
431
432
433
...
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
...
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
...
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
...
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
...
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
...
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
....
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
....
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
....
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
....
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
....
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
....
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
....
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870









1871
1872
1873
1874
1875
1876
1877
....
1900
1901
1902
1903
1904
1905
1906
1907

1908
1909

1910
1911


1912
1913
1914


1915

















1916
1917
1918
1919
1920
1921
1922
1923
1924
....
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
....
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251






2252
2253
2254
2255
2256
2257
2258
....
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312


2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
....
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
....
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
....
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
....
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
....
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
....
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
....
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Tablelist Programmer's Guide</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................

  <h4><a href="#examples">Examples</a></h4>

  <ul>
    <li><a href="#ex_config">A tablelist Widget for Displaying and Editing
    Configuration Options</a></li>

    <li><a href="#ex_browse">Two Scalable Widget Browsers Based on a
    tablelist</a></li>

    <li><a href="#ex_dirViewer">A Scalable 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 Scalable Interactive tablelist Cell
    Editing</a></li>

    <li><a href="#ex_windows">A tablelist Widget Containing Scalable Embedded
    Windows</a></li>

    <li><a href="#ex_tile">Tile-Based Demo Scripts</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
................................................................................
      <a href="https://www.nemethi.de">https://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.10.tar.gz</code> for UNIX and
  <code>tablelist6_10.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 href="https://core.tcl.tk/tklib">https://core.tcl.tk/tklib</a>
    </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.10.tar.gz</code>:</p>

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

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

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

  <p>Both commands will create a directory named <code>tablelist6.10</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_10.zip</code> into the directory
  <code>tablelist6.10</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.10, then it is highly
  recommended to specify the version number <code>6.10</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.10</code>,&nbsp; and their
  tile-based counterparts invoke the command&nbsp; <code>package require
  tablelist_tile 6.10</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>?
................................................................................
  <ul>
    <li>The variable <code>tablelist::version</code> holds the current version
    number of the Tablelist and Tablelist_tile packages.</li>

    <li>The variable <code>tablelist::library</code> holds the location of the
    Tablelist installation directory.</li>

    <li>The read-only variable <code>tablelist::scalingpct</code> holds the
    scaling percentage corresponding to the display's DPI scaling level.&nbsp;
    Tablelist adapts the default sort arrow style on Windows Vista, 7, 8, and
    10, as well as the sizes of the tree styles <code>vistaAero</code>,
    <code>vistaClassic</code>, <code>win7Aero</code>, <code>win7Classic</code>,
    and <code>win10</code> to the value of this variable.&nbsp; The currently
    supported values are <code>100</code>, <code>125</code>, <code>150</code>,
    <code>175</code>, and <code>200</code>.&nbsp; You can use this variable on
    all platforms, e.g., if you want to create images of different sizes,
................................................................................
  <h3 id="ov_scaling">More on <code>tablelist::scalingpct</code></h3>

  <p>The way Tablelist initializes the variable
  <code>tablelist::scalingpct</code> depends on the windowing system:</p>

  <p><i>On Windows and Mac OS X Aqua</i> the scaling percentage is computed
  from&nbsp; <code>[tk scaling]</code>.&nbsp; Note that on Mac OS X the result
  is always <code>100</code>, regardless of the display's scaling level.&nbsp;

  On this system the desktop engine automatically scales everything as
  needed.</p>

  <p><i>On X11</i>, computing the scaling percentage from&nbsp; <code>[tk
  scaling]</code>&nbsp; is done as fallback method only, because the
  implementation of display scaling is highly dependent on the desktop
  environment and it mostly manipulates system resources that are resident
  outside of Xlib, which Tk is based on.&nbsp; (Traditional X applications like
  <code>bitmap</code> and <code>xmag</code> are also affected by this.)&nbsp;
................................................................................

  <ul>
    <li class="tm">On <i>Xfce and MATE</i> the display scaling mode can be
    either unscaled (1x, normal) or scaled (2x, HiDPI), and the variable
    <code>tablelist::scalingpct</code> will be set accordingly to
    <code>100</code> or <code>200</code>.</li>

    <li class="tm">In case of <i>GNOME on Xorg, Budgie, and Cinnamon versions
    earlier than 4.6</i>, the display scaling can be either 100 % or 200 %, and
    Tablelist sets the variable <code>tablelist::scalingpct</code> accordingly
    to <code>100</code> or <code>200</code>.&nbsp; In newer GNOME and Budgie
    versions on Ubuntu one can enable the
    <code>x11-randr-fractional-scaling</code> as experimental feature, which
    adds 125 %, 150 %, and 175 % to the list of supported scaling
    percentages.&nbsp; Note that, due to the way this fractional scaling is
    implemented, if the display scaling was set to one of these intermediate
    levels, the value of <code>tablelist::scalingpct</code> will be

    <code>200</code>.&nbsp; The same is valid for the fractional scaling
    support on Cinnamon, introduced in version 4.6.</li>

    <li class="tm"><i>GNOME on Wayland</i> traditionally supports the display
    scaling values 100 % and 200 %, and the variable
    <code>tablelist::scalingpct</code> will be set accordingly to
    <code>100</code> or <code>200</code>.&nbsp; In newer GNOME versions one can
    enable the experimental feature <code>scale-monitor-framebuffer</code>,
    which adds 125 %, 150 %, and 175 % to the list of supported scaling
................................................................................
    display's scaling level.</li>

    <li class="tm"><i>KDE Plasma on Wayland</i> supports fractional scaling,
    too.&nbsp; In this case, the value of the variable
    <code>tablelist::scalingpct</code> will always be <code>100</code>,
    regardless of the display's scaling level.</li>
  </ul>

  <p>After getting the scaling percentage on X11, Tablelist sets the scaling
  factor to be used by Tk to convert between physical units and pixels, by
  passing the scaling factor corresponding to the scaling percentage to
  the&nbsp; <code>[tk scaling]</code>&nbsp; command.</p>

  <p>When initializing the variable <code>tablelist::scalingpct</code> on X11,
  Tablelist also corrects the sizes of the standard fonts if needed.&nbsp;
  These fonts (<code>TkDefaultFont</code>, <code>TkTextFont</code>, etc.) are
  defined in the file <code>$tk_library/ttk/fonts.tcl</code>.&nbsp; For quite a
  long time, the font sizes for X11 given in this file were sizes in pixels,
  which was not suitable for use on HiDPI displays.&nbsp; This caused several
................................................................................
  that, regardless of the Tk version, the font sizes will suit the display's
  scaling level, Tablelist examines this library file and, if the latter
  contains sizes in pixels, then it sets the <code>-size</code> option of the
  standard fonts to corresponding sizes in points (without altering the
  file).&nbsp; In addition, for the HiDPI mode on Xfce and MATE, Tablelist
  doubles the sizes (in points) of the standard fonts (the way display scaling
  works on these desktops makes this necessary).</p>

  <p>Independently of the windowing system, the code responsible for the
  initialization of the variable <code>tablelist::scalingpct</code> also
  scales:</p>

  <ul>
    <li>the default width of the Tk core scrollbars on X11;</li>

    <li>for the built-in themes <code>alt</code>, <code>clam</code>,
    <code>classic</code>, and <code>default</code>, the default width of the
    ttk::scrollbar widget, as well as the arrows of the ttk::combobox and
    ttk::spinbox widgets;</li>

    <li>for the <code>alt</code> and <code>clam</code> themes, the arrow of
    the ttk::menubutton widget;</li>

    <li>for the <code>clam</code>, <code>classic</code>, and
    <code>default</code> themes, the indicators of the ttk::checkbutton and
    ttk::radiobutton widgets.</li>
  </ul>

  <p>In addition, the above-mentioned variable initialization code makes sure
  that in the <code>vista</code> and <code>xpnative</code> themes the
  indicators of the ttk::checkbutton and ttk::radiobutton widgets will appear
  properly scaled, regardless of the Tk release being used.&nbsp; (A
  long-standing bug in the implementation of these widgets was fixed in May
  2020, but Tablelist provides a workaround for the Tk versions that are still
  affected by this bug.)</p>

  <h3 id="ov_tile">More on Tablelist_tile</h3>

  <p>A tablelist widget consists of a body (containing the items) and a header
  (displaying the column titles and optional header items).&nbsp; Both
  components are contained in a hull, implemented as a frame.&nbsp; The header
  has a rather complex structure, consisting, among others, of frame and label
................................................................................
      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.10
source [file join $tablelist::library demos config.tcl]
</pre>
      </blockquote>
    </li>
  </ul>

  <p>In both cases, the script will print the following message to
................................................................................
  </blockquote>

  <p>then another toplevel window containing the tablelist widget
  <code>.configTop2.tf.tbl</code> will pop up.&nbsp; The latter looks like in
  the following figure:</p>

  <blockquote>
    <img src="config.png" alt="Configuration Options" width="835" height="400">
  </blockquote>

  <p>It is assumed that the Tcl command associated with the widget specified by
  <code>&lt;widgetName&gt;</code> has a <code>configure</code> subcommand
  which, when invoked without any argument, returns a list describing all of
  the available configuration options for the widget, in the common format
  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.10

namespace eval demo {
    <span class="cmt">#
    # 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:
    #
................................................................................
    } else {
        grid [$tbl cornerpath] -row 0 -column 1 -sticky ew
        grid $vsb              -row 1 -column 1 -sticky ns
    }
    grid $hsb -row 2 -column 0 -sticky ew
    grid rowconfigure    $tf 1 -weight 1
    grid columnconfigure $tf 0 -weight 1
    pack $b1 $b2 $b3 -side left -expand yes -pady 7p
    pack $bf -side bottom -fill x
    pack $tf -side top -expand yes -fill both

    <span class="cmt">#
    # Populate the tablelist with the configuration options of the given widget
    #</span>
    putConfig $w $tbl
................................................................................
  "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
  "Refresh" button, as the value of its <code>-command</code> configuration
  option.&nbsp; This procedure is implemented as follows:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# demo::putConfig
#
# Outputs the configuration options of the widget w into the tablelist widget
................................................................................
  is given by the <code>cget</code> subcommand of the Tcl command associated
  with that widget.&nbsp; For example, a boolean value will always be replaced
  with <code>1</code> or <code>0</code>, even if the entry contains the string
  <code>yes</code> or <code>no</code>.&nbsp; The procedure returns this
  canonical option value, thus making sure that the latter will become the new
  content of the cell that was just edited.</p>

  <h3 id="ex_browse">Two Scalable Widget Browsers Based on a tablelist</h3>

  <p>The files <code>browse.tcl</code> and <code>browseTree.tcl</code> in the
  <code>demos</code> directory contain a procedure
  <code>demo::displayChildren</code> that displays information about the
  children of an arbitrary widget in a tablelist contained in a newly created
  toplevel widget.&nbsp; To test it, start <code>wish</code> and evaluate the
  chosen file by using the <code>source</code> command, in a similar way as in
................................................................................
  in a new toplevel window is created and its name is printed to
  <code>stdout</code>.</p>

  <p>The tablelist created by the procedure <code>demo::displayChildren</code>
  in the file <code>browse.tcl</code> is a multi-column listbox:</p>

  <blockquote>
    <img src="browse.png" alt="Widget Browser" width="607" height="297">
  </blockquote>

  <p>The tablelist created by the procedure of the same name in the file
  <code>browseTree.tcl</code> is a multi-column tree widget:</p>

  <blockquote>
    <img src="browseTree.png" alt="Widget Browser" width="615" height="297">
  </blockquote>

  <p>The <code>demo::displayChildren</code> command inserts some data of the
  children of the widget specified by <code>&lt;widgetName&gt;</code> into a
  vertically scrolled tablelist with 9 dynamic-width columns and interactive
  sort capability, and returns the name of the newly created tablelist
  widget.&nbsp; By double-clicking an item (e.g., the one containing the path
  name <code>.browseTop</code> in <code>browse.tcl</code> and the name
  <code>browseTop</code> in <code>browseTree.tcl</code>) or invoking the first
  entry of a pop-up menu within the body of the tablelist, you can display the
  data of the children of the widget corresponding to the selected item, and
  with the second menu entry you can display its configuration options (see the
  <a href="#ex_config">previous example</a> for details).&nbsp; To go one level
  up, click on the "Parent" button.</p>

  <p>There is a lot of code common to the scripts <code>browse.tcl</code> and
  <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.10

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

    <span class="cmt">#
    # Create two images corresponding to the display's DPI scaling level
    #</span>
    set pct $::tablelist::scalingpct
    variable compImg [image create bitmap -file [file join $dir comp$pct.xbm] \
                      -background yellow -foreground gray50]
    variable leafImg [image create bitmap -file [file join $dir leaf$pct.xbm] \
                      -background coral -foreground gray50]
}

source [file join $demo::dir config.tcl]
</pre>
  </blockquote>

  <p>The two images representing a "compound" widget (with children) and a
  "leaf" widget (without children), respectively, are created from files whose
  names contain the display's DPI scaling level, given by the public variable
  <code>tablelist::scalingpct</code>.&nbsp; The X bitmap files
  <code>comp100.xbm</code> and <code>leaf100.xbm</code> contain images of size
  16 x 13, the files <code>*125.xbm</code> contain images of size 20 x 16, the
  files <code>*150.xbm</code> contain images of size 24 x 19, and so on.</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# demo::displayChildren
#
# Displays information on the children of the widget w in a tablelist widget
# contained in a newly created toplevel widget.  Returns the name of the
# tablelist widget.
#------------------------------------------------------------------------------</span>
................................................................................
    foreach col {2 3 4 5} {
        $tbl columnconfigure $col -sortmode integer
    }
    foreach col {6 7} {
        $tbl columnconfigure $col -formatcommand demo::formatBoolean
    }
    scrollbar $vsb -orient vertical -command [list $tbl yview]

    <span class="cmt">#
    # On X11 configure the tablelist according
    # to the display's DPI scaling level
    #</span>
    variable winSys                                     ;<span class="cmt"># see config.tcl</span>
    if {[string compare $winSys "x11"] == 0} {
        $tbl configure -treestyle bicolor$::tablelist::scalingpct
    }

    <span class="cmt">#
    # When displaying the information about the children of any
    # ancestor of the label widgets, the widths of some of the
    # labels and thus also the widths and x coordinates of some
    # children may change.  For this reason, make sure the items
    # will be updated after any change in the sizes of the labels
................................................................................
  <p>The same <code>columnconfigure</code> subcommand enables us to specify
  that, when displaying the elements of columns 6 and 7 (having the titles
  <code>"Mapped"</code> and <code>"Viewable"</code>, respectively), the boolean
  values <code>1</code> and <code>0</code> will be replaced with the strings
  <code>"yes"</code> and <code>"no"</code>, returned by the
  <code>demo::formatBoolean</code> command shown below.</p>

  <p>In a scaling-aware application the value of the <code><a href=
  "tablelistWidget.html#treestyle">-treestyle</a></code> tablelist option
  should reflect the display's DPI scaling level.&nbsp; On Windows Vista, 7, 8,
  and 10 the default value of this option already fulfills this requirement,
  and on Mac OS X Aqua the desktop engine automatically scales everything as
  needed.&nbsp; On X11 we set the <code>-treestyle</code> option to one of
  <code>bicolor100</code>, ..., <code>bicolor200</code>, depending on the value
  of the public variable <code>::tablelist::scalingpct</code>.</p>

  <p>After configuring the <code>-treestyle</code> option on X11, we iterate
  over the elements of the list containing the path names of all header labels
  of the tablelist widget, returned by the <code><a href=
  "tablelistWidget.html#labels">labels</a></code> subcommand of the Tcl command
  corresponding to the widget.&nbsp; For each element of the list, we bind the
  procedure <code>demo::updateItemsDelayed</code> to the
  <code>&lt;Configure&gt;</code> event.&nbsp; In this way we make sure the
  procedure will be invoked whenever the header label indicated by that list
  element changes size.</p>

  <p>The four invocations of the <code>bind</code> command following the
  creation of the pop-up menu make use of a binding tag whose name depends on
  the path name of the tablelist widget and is returned by the <code><a href=
  "tablelistWidget.html#bodytag">bodytag</a></code> subcommand of the Tcl
  command associated with the tablelist widget.&nbsp; The advantage of using
  this tag instead of the path name of the tablelist's body is that this
................................................................................
        putChildren $w $tbl
    }
}
</pre>
  </blockquote>

  <p>The procedure <code>demo::refreshView</code>, associated with the
  "Refresh" button, is implemented as follows:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# demo::refreshView
#
# Redisplays the data of the children of the widget w in the tablelist widget
................................................................................

  <p>The script <code>dirViewer.tcl</code> in the <code>demos</code> directory
  displays the contents of the volumes mounted on the system (e.g., the root
  <code>/</code> on UNIX and the local drives on Windows) in a tablelist used
  as multi-column tree widget:</p>

  <blockquote>
    <img src="dirViewer.png" alt="Directory Viewer" width="675" height="454">
  </blockquote>

  <p>By double-clicking an item or invoking the single entry of a pop-up menu
  within the body of the tablelist, you can display the content of the folder
  corresponding to the selected item.&nbsp; To go one level up, click on the
  "Parent" button.</p>

  <p>There are a lot of similarities between this script and the one discussed
  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.10

<span class="cmt">#
# Add some entries to the Tk option database
#</span>
set dir [file dirname [info script]]
source [file join $dir option.tcl]

................................................................................
    $tbl columnconfigure 0 -formatcommand formatString -sortmode dictionary
    $tbl columnconfigure 1 -formatcommand formatSize -sortmode integer
    $tbl columnconfigure 2 -formatcommand formatString
    scrollbar $vsb -orient vertical   -command [list $tbl yview]
    scrollbar $hsb -orient horizontal -command [list $tbl xview]

    <span class="cmt">#
    # On X11 configure the tablelist according
    # to the display's DPI scaling level
    #</span>
    global winSys                                       ;<span class="cmt"># see option.tcl</span>
    if {[string compare $winSys "x11"] == 0} {
        $tbl configure -treestyle bicolor$tablelist::scalingpct









    }

    . . .

    <span class="cmt">#
    # Populate the tablelist with the content of the given directory
    #</span>
................................................................................
  <p>The procedure specifies a value not only for the <code><a href=
  "tablelistWidget.html#expandcommand">-expandcommand</a></code> option of the
  tablelist it creates, but also for its <code><a href=
  "tablelistWidget.html#collapsecommand">-collapsecommand</a></code>
  option.&nbsp; The latter will merely restore the image shown in the first
  column to the one displaying a closed folder (see below).</p>

  <p>In a scaling-aware application the value of the <code><a href=

  "tablelistWidget.html#treestyle">-treestyle</a></code> tablelist option
  should reflect the display's DPI scaling level.&nbsp; On Windows Vista, 7, 8,

  and 10 the default value of this option already fulfills this requirement,
  and on Mac OS X Aqua the desktop engine automatically scales everything as


  needed.&nbsp; On X11 we set the <code>-treestyle</code> option to one of
  <code>bicolor100</code>, ..., <code>bicolor200</code>, depending on the value
  of the public variable <code>tablelist::scalingpct</code>.</p>




















  <p>Let's see how the script populates the tablelist with the content of the
  given directory:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# putContents
#
# Outputs the content of the directory dir into the tablelist widget tbl, as
................................................................................

  <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>
    <img src="styles.png" alt="Styles" width="695" height="512">
  </blockquote>

  <p>Here is the relevant code segment:</p>

  <blockquote>
    <pre>
<span class="cmt">#
................................................................................
  visual effect it produces looks nice both by itself and combined with
  horizontal or vertical stripes, created by using the <code><a href=
  "tablelistWidget.html#stripebackground">-stripebackground</a></code> option
  and the <code><a href=
  "tablelistWidget.html#columnconfigure">columnconfigure</a></code> subcommand,
  respectively.</p>

  <h3 id="ex_editing">Advanced Scalable Interactive tablelist Cell Editing</h3>

  <p>The scripts <code>tileWidgets.tcl</code>, <code>bwidget.tcl</code>,
  <code>iwidgets.tcl</code>, and <code>miscWidgets.tcl</code> in the
  <code>demos</code> directory create a tablelist widget displaying some
  parameters of 16 serial lines, and demonstrate how to use various widgets
  from the Tk core and from the packages tile, BWidget, Iwidgets, combobox (by
  Bryan Oakley), ctext, and Mentry (or Mentry_tile) for interactive cell
  editing.&nbsp; The following figure shows the tablelist widget, together with
  a BWidget ComboBox used to edit the content of one of its cells:</p>

  <blockquote>
    <img src="bwidget.png" alt="Serial Line Configuration" width="841" height=
    "407">
  </blockquote>

  <p>Here is the relevant code segment from the script <code>bwidget.tcl</code>
  (the scripts <code>tileWidgets.tcl</code>, <code>iwidgets.tcl</code>, and
  <code>miscWidgets.tcl</code> are similar).&nbsp; A few parts of the code are
  shown in <span class="red">red</span> color &ndash; we will return to this
  towards the end of the section.</p>

  <blockquote>
    <pre>
package require Tk 8.4                          ;<span class="cmt"># because of "-compound"</span>
package require tablelist 6.10
package require BWidget

wm title . "Serial Line Configuration"

<span class="cmt">#
# Add some entries to the Tk option database
#</span>
set dir [file dirname [info script]]
source [file join $dir option.tcl]
option add *Tablelist*Entry.background white

<span class="cmt">#
# Create the images "checkedImg" and "uncheckedImg", as well as 16 images of
# names like "img#FF0000", displaying colors identified by names like "red"
#</span>
source [file join $dir images.tcl]

<span class="cmt">#
# Register some widgets from the BWidget package for interactive cell editing
#</span>
tablelist::addBWidgetEntry
tablelist::addBWidgetSpinBox
tablelist::addBWidgetComboBox







<span class="cmt">#
# Create a tablelist widget with editable columns (except the first one)
#</span>
set tbl .tbl
tablelist::tablelist $tbl \
    -columns {0 "No."             right
              0 "Available"       center
................................................................................
        $clock $clock [lindex $colorNames $i]]

    <span class="red">set availImg [expr {($i &lt; 8) ? "checkedImg" : "uncheckedImg"}]
    $tbl cellconfigure end,available -image $availImg</span>
    $tbl cellconfigure end,color -image img[lindex $colorValues $i]
}

. . .
</pre>
  </blockquote>



  <p>The sizes of the images created in the file <code>images.tcl</code>, which
  is <code>source</code>d into the main script, depend on the display's scaling
  level, given by the public variable <code>tablelist::scalingpct</code>.&nbsp;
  For example:</p>

  <blockquote>
    <pre>
set pct $tablelist::scalingpct
image create photo checkedImg   -file [file join $dir checked$pct.gif]
image create photo uncheckedImg -file [file join $dir unchecked$pct.gif]
</pre>
  </blockquote>

  <p>We invoke the <code><a href=
  "tablelistBWidget.html#Entry">tablelist::addBWidgetEntry</a></code>,
  <code><a href=
  "tablelistBWidget.html#SpinBox">tablelist::addBWidgetSpinBox</a></code>, and
................................................................................
  and the validation facilities specific to that library.&nbsp; The third
  script makes use of the entry, spinbox, checkbutton, and menubutton widgets
  from the Tk core, Bryan Oakley's combobox, and of the mentry widgets of type
  <code>"Date"</code> and <code>"Time"</code>, and it performs the entry
  validation with the aid of the Wcb package (which is required anyway for the
  Mentry library).</p>

  <h3 id="ex_windows">A tablelist Widget Containing Scalable Embedded
  Windows</h3>

  <p>The script <code>embeddedWindows.tcl</code> in the <code>demos</code>
  directory creates a tablelist widget whose items correspond to the Tk library
  scripts.&nbsp; The size of each file (in bytes) is not only displayed as a
  number, but is also illustrated with the aid of a frame with red background,
  created as a child of an embedded frame with ivory background.&nbsp; The
  files can be viewed by clicking on the corresponding embedded button
................................................................................
  widgets.</p>

  <p>The following screenshot shows the tablelist widget with the mouse cursor
  over the first header label, causing this label to appear in
  <code>active</code> state:</p>

  <blockquote>
    <img src="embeddedWindows.png" alt="Embedded Windows" width="426" height=
    "308">
  </blockquote>

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

  <blockquote>
    <pre>
package require tablelist 6.10

wm title . "Tk Library Scripts"

<span class="cmt">#
# Add some entries to the Tk option database
#</span>
set dir [file dirname [info script]]
................................................................................

<span class="cmt">#
# Create the font TkFixedFont if not yet present
#</span>
catch {font create TkFixedFont -family Courier -size -12}

<span class="cmt">#
# Create an image corresponding to the display's DPI scaling
# level, to be displayed in buttons embedded in a tablelist widget
#</span>
image create photo openImg -file [file join $dir openAction$pct.gif]

<span class="cmt">#
# Create a vertically scrolled tablelist widget with 5
# dynamic-width columns and interactive sort capability
#</span>
set tf .tf
frame $tf -class ScrollArea
................................................................................
}
if {$tk_version &gt;= 8.5} {
    $tbl header insert 0 [list "[$tbl size] *.tcl files" "" $totalSize "" ""]
    $tbl header rowconfigure 0 -foreground blue
}
</pre>
  </blockquote>

  <p>The image representing an "open" action is created from a file whose name
  contains the display's DPI scaling level, given by the public variable
  <code>tablelist::scalingpct</code>.</p>

  <p>We insert the size of each file not only into the column with the
  title&nbsp; <code>"File Size"</code>,&nbsp; but also into the column&nbsp;
  <code>"Bar Chart"</code>.&nbsp; Since we configured this column with&nbsp;
  <code>-formatcommand emptyStr</code>,&nbsp; the text will remain hidden in
  it.&nbsp; It will, however, be needed when sorting the items by that
  column.</p>
................................................................................
# file whose name is diplayed in the first column of the cell's row.
#------------------------------------------------------------------------------</span>
proc createFrame {tbl row col w} {
    <span class="cmt">#
    # Create the frame and replace the binding tag "Frame"
    # with "TablelistBody" in the list of its binding tags
    #</span>
    set height [expr {[font metrics $::tblFont -linespace] * 4 / 5}]
    frame $w -width 72p -height $height -background ivory -borderwidth 1 \
             -relief solid
    bindtags $w [lreplace [bindtags $w] 1 1 TablelistBody]

    <span class="cmt">#
    # Create the child frame and replace the binding tag "Frame"
    # with "TablelistBody" in the list of its binding tags
    #</span>
    frame $w.f -background red -borderwidth 1 -relief raised
    bindtags $w.f [lreplace [bindtags $w] 1 1 TablelistBody]

    <span class="cmt">#
    # Manage the child frame
    #</span>
    set fileSize [$tbl cellcget $row,fileSize -text]
    place $w.f -relheight 1.0 -relwidth [expr {double($fileSize) / $::maxSize}]
}
</pre>
  </blockquote>

  <p>Notice that we specify the values of the <code>-width</code> and
  <code>-height</code> options for the frame in a scaling-aware manner.</p>

  <p>Since the frame will be embedded into the tablelist's body, we want to
  have the same handling of the mouse events in the frame and in its child
  frame as in the rest of the tablelist's body.&nbsp; To this end we replace
  the binding tag <code>Frame</code> (which has no own bindings anyway) with
  <code><a href="tablelistWidget.html#body_bindings">TablelistBody</a></code>,
  thus making sure that the default binding scripts associated with that tag
  will be valid for the parent frame and its child, too.</p>

  <p>We <code>place</code> the red child frame within its parent using the
  <code>-relheight</code> and <code>-relwidth</code> options, to make sure that
  it will vertically fill the area inside its parent's border and its width
  will remain proportional to the size of the corresponding file when resizing
  the parent frame (which will happen when resizing its column, as seen
  below).</p>

  <p>The creation script for the buttons used for viewing the Tk library files
  is quite simple:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
................................................................................
  <span class="red">red</span> color:</p>

  <p>First, we replace the starting lines</p>

  <blockquote>
    <pre>
package require Tk 8.3                          ;<span class="cmt"># because of entry validation</span>
package require tablelist 6.10
</pre>
  </blockquote>

  <p>with</p>

  <blockquote>
    <pre>
package require tablelist<span class="red">_tile</span> 6.10
</pre>
  </blockquote>

  <p>and the command</p>

  <blockquote>
    <pre>
................................................................................
  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="402">
  </blockquote>

  <p>The tile-based version of the demo script <code><a href=
  "#ex_windows">embeddedWindows.tcl</a></code> contains a bit more changes, but
  most of them are not Tablelist-specific.&nbsp; Please take a look at the file
  <code>embeddedWindows_tile.tcl</code> in the <code>demos</code> directory for
  the details.&nbsp; Here is a screenshot of the resulting window:</p>

  <blockquote>
    <img src="embeddedWindows_tile.png" alt="Embedded Windows" width="426"
    height="314">
  </blockquote>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>
</body>
</html>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
75
76
77
78
79
80
81





82
83
84
85
86
87
88
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the BWidget Package</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
    and its <code><b><a href=
    "tablelistWidget.html#col_editwindow">-editwindow</a></b></code> option to
    the value returned by the command mentioned above.&nbsp; (These options are
    supported at cell level, too, with the aid of the <code><b><a href=
    "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
    subcommand.)</li>
  </ol>






  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>







|







 







>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the BWidget Package</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
    and its <code><b><a href=
    "tablelistWidget.html#col_editwindow">-editwindow</a></b></code> option to
    the value returned by the command mentioned above.&nbsp; (These options are
    supported at cell level, too, with the aid of the <code><b><a href=
    "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
    subcommand.)</li>
  </ol>

  <p><b>REMARK:</b>&nbsp; The temporary embedded BWidget widget used for
  interactive cell editing will appear properly scaled, according to the
  display's DPI scaling level, given by the variable
  <code><b>tablelist::scalingpct</b></code>.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Commands Related to Binding Scripts</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Commands Related to Binding Scripts</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Commands for Interactive Sorting by One or More Columns</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Commands for Interactive Sorting by One or More Columns</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
71
72
73
74
75
76
77





78
79
80
81
82
83
84
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the combobox Package</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
    and its <code><b><a href=
    "tablelistWidget.html#col_editwindow">-editwindow</a></b></code> option to
    the value returned by the command mentioned above.&nbsp; (These options are
    supported at cell level, too, with the aid of the <code><b><a href=
    "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
    subcommand.)</li>
  </ol>






  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>







|







 







>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the combobox Package</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
    and its <code><b><a href=
    "tablelistWidget.html#col_editwindow">-editwindow</a></b></code> option to
    the value returned by the command mentioned above.&nbsp; (These options are
    supported at cell level, too, with the aid of the <code><b><a href=
    "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
    subcommand.)</li>
  </ol>

  <p><b>REMARK:</b>&nbsp; The arrow and scrollbar components of the temporary
  embedded combobox widget used for interactive cell editing will appear
  properly scaled, according to the display's DPI scaling level, given by the
  variable <code><b>tablelist::scalingpct</b></code>.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the ctext Package</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the ctext Package</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
85
86
87
88
89
90
91





92
93
94
95
96
97
98
...
190
191
192
193
194
195
196
197



198
199
200
201
202
203
204
...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the Iwidgets Package</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
    and its <code><b><a href=
    "tablelistWidget.html#col_editwindow">-editwindow</a></b></code> option to
    the value returned by the command mentioned above.&nbsp; (These options are
    supported at cell level, too, with the aid of the <code><b><a href=
    "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
    subcommand.)</li>
  </ol>






  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>
................................................................................
    <code><b><a href=
    "tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
    tablelist configuration option to set any of the widget's options, like
    <code><b>-gmt</b></code>, <code><b>-iq</b></code>, <code><b>-int</b></code>
    ("international" date format, supported by datefield and dateentry
    widgets), or <code><b>-format</b></code> (for timefield and timeentry
    widgets, with the values <code><b>civilian</b></code> and
    <code><b>military</b></code>).</dd>




    <dt class="tm"><b>KEYWORDS</b></dt>

    <dd>tablelist, editing, Iwidgets, datefield, dateentry, timefield,
    timeentry</dd>
  </dl>

................................................................................
    <code><b>-editable</b></code> option set to <code>1</code> and its
    <code><b>-grab</b></code> option set to <code><b>global</b></code>.&nbsp;
    You can use the script corresponding to the <code><b><a href=
    "tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
    tablelist configuration option to make the combobox non-editable or define
    validations for it, as well as for populating its listbox component (by
    using the combobox widget's&nbsp; <code><b>insert list</b></code>&nbsp;
    subcommand).</dd>

    <dt class="tm"><b>KEYWORDS</b></dt>

    <dd>tablelist, editing, Iwidgets, combobox</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>
</body>
</html>







|







 







>
>
>
>
>







 







|
>
>
>







 







|












9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
...
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
...
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the Iwidgets Package</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
    and its <code><b><a href=
    "tablelistWidget.html#col_editwindow">-editwindow</a></b></code> option to
    the value returned by the command mentioned above.&nbsp; (These options are
    supported at cell level, too, with the aid of the <code><b><a href=
    "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
    subcommand.)</li>
  </ol>

  <p><b>REMARK:</b>&nbsp; The temporary embedded Iwidgets widget used for
  interactive cell editing will appear properly scaled, according to the
  display's DPI scaling level, given by the variable
  <code><b>tablelist::scalingpct</b></code>.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>
................................................................................
    <code><b><a href=
    "tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
    tablelist configuration option to set any of the widget's options, like
    <code><b>-gmt</b></code>, <code><b>-iq</b></code>, <code><b>-int</b></code>
    ("international" date format, supported by datefield and dateentry
    widgets), or <code><b>-format</b></code> (for timefield and timeentry
    widgets, with the values <code><b>civilian</b></code> and
    <code><b>military</b></code>).&nbsp; For the dateentry widget you might
    also set the <code><b>-startday</b></code> option to
    <code><b>monday</b></code> and the <code><b>-days</b></code> option, e.g.,
    to <code>{Mo Tu We Th Fr Sa Su}</code>.</dd>

    <dt class="tm"><b>KEYWORDS</b></dt>

    <dd>tablelist, editing, Iwidgets, datefield, dateentry, timefield,
    timeentry</dd>
  </dl>

................................................................................
    <code><b>-editable</b></code> option set to <code>1</code> and its
    <code><b>-grab</b></code> option set to <code><b>global</b></code>.&nbsp;
    You can use the script corresponding to the <code><b><a href=
    "tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
    tablelist configuration option to make the combobox non-editable or define
    validations for it, as well as for populating its listbox component (by
    using the combobox widget's&nbsp; <code><b>insert list</b></code>&nbsp;
    subcommand and <code><b>-listheight</b></code> option).</dd>

    <dt class="tm"><b>KEYWORDS</b></dt>

    <dd>tablelist, editing, Iwidgets, combobox</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>
</body>
</html>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the Mentry Package</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using the Mentry Package</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Commands Related to Tile Themes</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Commands Related to Tile Themes</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
90
91
92
93
94
95
96











97
98
99

100
101
102
103
104
105
106
107
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using Tile Widgets</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
  <code><b>ttk::combobox</b></code>, <code><b>ttk::checkbutton</b></code>, or
  <code><b>ttk::menubutton</b></code> (or to the corresponding fully-qualified
  name), respectively.&nbsp; (These options are supported at cell level, too,
  with the aid of the <code><b><a href=
  "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
  subcommand.)</p>












  <p>One known limitation of earlier tile versions was that the&nbsp;
  <code><b>(ttk::)style theme use</b></code>&nbsp; command could only be used
  to set the current theme, but not to retrieve it.&nbsp; For this reason,

  Tablelist makes use of the variable <code><b>ttk::currentTheme</b></code> or
  <code><b>tile::currentTheme</b></code> (depending on the tile version), which
  is set by the <code><b>ttk::setTheme</b></code> or
  <code><b>tile::setTheme</b></code> procedure.&nbsp; From this it follows that
  the tile widgets used for interactive cell editing will only be managed as
  expected if the platform-specific default theme is either left unchanged or
  replaced with another theme by invoking the procedure
  <code><b>ttk::setTheme</b></code> or <code><b>tile::setTheme</b></code>,







|







 







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







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using Tile Widgets</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
  <code><b>ttk::combobox</b></code>, <code><b>ttk::checkbutton</b></code>, or
  <code><b>ttk::menubutton</b></code> (or to the corresponding fully-qualified
  name), respectively.&nbsp; (These options are supported at cell level, too,
  with the aid of the <code><b><a href=
  "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
  subcommand.)</p>

  <p><b>REMARK 1:</b>&nbsp; When using one of the built-in themes, the
  temporary embedded tile widget used for interactive cell editing will appear
  properly scaled, according to the display's DPI scaling level, given by the
  variable <code><b>tablelist::scalingpct</b></code>.&nbsp; The only exception
  is the tile checkbutton widget, which will be scaled as expected for the
  themes <code><b>aqua</b></code>, <code><b>clam</b></code>,
  <code><b>classic</b></code>, <code><b>default</b></code>, 
  <code><b>vista</b></code>, and <code><b>xpnative</b></code>, but, for
  technical reasons, cannot be scaled if the theme is <code><b>alt</b></code>
  or <code><b>winnative</b></code>.</p>

  <p><b>REMARK 2:</b>&nbsp; One known limitation of earlier tile versions was
  that the&nbsp; <code><b>(ttk::)style theme use</b></code>&nbsp; command could
  only be used to set the current theme, but not to retrieve it.&nbsp; For this
  reason, Tablelist makes use of the variable
  <code><b>ttk::currentTheme</b></code> or
  <code><b>tile::currentTheme</b></code> (depending on the tile version), which
  is set by the <code><b>ttk::setTheme</b></code> or
  <code><b>tile::setTheme</b></code> procedure.&nbsp; From this it follows that
  the tile widgets used for interactive cell editing will only be managed as
  expected if the platform-specific default theme is either left unchanged or
  replaced with another theme by invoking the procedure
  <code><b>ttk::setTheme</b></code> or <code><b>tile::setTheme</b></code>,

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

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
71
72
73
74
75
76
77





78
79
80
81
82
83
84
...
224
225
226
227
228
229
230

231
232

233
234
235
236
237
238
239
240
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using Tk Core Widgets</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
  <code><b>menubutton</b></code>, respectively.&nbsp; (These options are
  supported at cell level, too, with the aid of the <code><b><a href=
  "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
  subcommand.)&nbsp; Since the default value of the
  <code><b>-editwindow</b></code> column configuration option is
  <code><b>entry</b></code>, it is not necessary to set it explicitly if the
  editing should take place with the aid of an embedded entry widget.</p>






  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>
................................................................................
    checkbutton widget used for interactive cell editing will be created with
    explicitly set values for its <code><b>-borderwidth</b></code>,
    <code><b>-font</b></code>, <code><b>-padx</b></code>,
    <code><b>-pady</b></code>, and <code><b>-variable</b></code> options.&nbsp;
    In an X11 environment it will be created with explicitly set values for its
    <code><b>-borderwidth</b></code>, <code><b>-indicatoron</b></code>,
    <code><b>-image</b></code>, <code><b>-selectimage</b></code>,

    <code><b>-selectcolor</b></code>, and <code><b>-variable</b></code>
    options.&nbsp; You can use the script corresponding to the

    <code><b><a href="tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
    tablelist configuration option to set any other options, like
    <code><b>-offvalue</b></code> and <code><b>-onvalue</b></code>, according
    to the <i>internal</i> values of the cells.&nbsp; Since the default values
    of the <code><b>-offvalue</b></code> and <code><b>-onvalue</b></code>
    checkbutton options are <code>0</code> and <code>1</code>, you don't need
    to change these options if the cells have the same internal values
    <code>0</code> and <code>1</code>.</dd>







|







 







>
>
>
>
>







 







>


>
|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Interactive Tablelist Cell Editing Using Tk Core Widgets</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
  <code><b>menubutton</b></code>, respectively.&nbsp; (These options are
  supported at cell level, too, with the aid of the <code><b><a href=
  "tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
  subcommand.)&nbsp; Since the default value of the
  <code><b>-editwindow</b></code> column configuration option is
  <code><b>entry</b></code>, it is not necessary to set it explicitly if the
  editing should take place with the aid of an embedded entry widget.</p>

  <p><b>REMARK:</b>&nbsp; The temporary embedded Tk core widget used for
  interactive cell editing will appear properly scaled, according to the
  display's DPI scaling level, given by the variable
  <code><b>tablelist::scalingpct</b></code>.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>
................................................................................
    checkbutton widget used for interactive cell editing will be created with
    explicitly set values for its <code><b>-borderwidth</b></code>,
    <code><b>-font</b></code>, <code><b>-padx</b></code>,
    <code><b>-pady</b></code>, and <code><b>-variable</b></code> options.&nbsp;
    In an X11 environment it will be created with explicitly set values for its
    <code><b>-borderwidth</b></code>, <code><b>-indicatoron</b></code>,
    <code><b>-image</b></code>, <code><b>-selectimage</b></code>,
    <code><b>-background</b></code>, <code><b>-activebackground</b></code>,
    <code><b>-selectcolor</b></code>, and <code><b>-variable</b></code>
    options.&nbsp; You can use the script corresponding to the
    <code><b><a href=
    "tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
    tablelist configuration option to set any other options, like
    <code><b>-offvalue</b></code> and <code><b>-onvalue</b></code>, according
    to the <i>internal</i> values of the cells.&nbsp; Since the default values
    of the <code><b>-offvalue</b></code> and <code><b>-onvalue</b></code>
    checkbutton options are <code>0</code> and <code>1</code>, you don't need
    to change these options if the cells have the same internal values
    <code>0</code> and <code>1</code>.</dd>

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

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
....
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866




1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>The <code><b>tablelist::tablelist</b></code> Command</h1>

    <h2>For Tablelist Version 6.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
        <code><b>photo9x5</b></code>, <code><b>photo11x6</b></code>,
        <code><b>photo13x7</b></code>, <code><b>photo15x8</b></code>,
        <code><b>sunken8x7</b></code>, <code><b>sunken10x9</b></code>, and
        <code><b>sunken12x11</b></code>, as shown in the picture below.&nbsp;
        The default value depends on the windowing system in the Tablelist
        package and on the current theme in Tablelist_tile; see the description
        of the <code><b><a href="#arrowcolor">-arrowcolor</a></b></code> option
        for details.&nbsp; As mentioned there, the default arrow style on
        Windows 10 is <code><b>flatAngle7x4</b></code>.&nbsp; While this is in
        most cases true, notice that the default chosen by Tablelist can also




        be <code><b>flatAngle9x5</b></code>, <code><b>flatAngle11x6</b></code>,
        <code><b>flatAngle13x7</b></code>, or
        <code><b>flatAngle15x8</b></code>, depending on the display's scaling
        level.&nbsp; Similarly, on Windows Vista, 7, and 8, the default chosen
        by Tablelist will be <code><b>photo7x4</b></code>,
        <code><b>photo9x5</b></code>, <code><b>photo11x6</b></code>,
        <code><b>photo13x7</b></code>, or <code><b>photo15x8</b></code>,
        depending on the display's scaling level.</p>

        <p><img src="arrowStyles.png" alt="Arrow Styles" width="826" height=
        "113"></p>








|







 







|
|
|
>
>
>
>
|

|
<
|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
....
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873

1874
1875
1876
1877
1878
1879
1880
1881
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>The <code><b>tablelist::tablelist</b></code> Command</h1>

    <h2>For Tablelist Version 6.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
................................................................................
        <code><b>photo9x5</b></code>, <code><b>photo11x6</b></code>,
        <code><b>photo13x7</b></code>, <code><b>photo15x8</b></code>,
        <code><b>sunken8x7</b></code>, <code><b>sunken10x9</b></code>, and
        <code><b>sunken12x11</b></code>, as shown in the picture below.&nbsp;
        The default value depends on the windowing system in the Tablelist
        package and on the current theme in Tablelist_tile; see the description
        of the <code><b><a href="#arrowcolor">-arrowcolor</a></b></code> option
        for details.&nbsp; As mentioned there, the default arrow style on X11
        and in some tile themes is <code><b>flat8x4</b></code>.&nbsp; While
        this is in most cases true, notice that the default chosen by Tablelist
        can also be <code><b>flat9x5</b></code>, <code><b>flat11x6</b></code>,
        <code><b>flat13x7</b></code>, or <code><b>flat15x8</b></code>,
        depending on the display's scaling level.&nbsp; Similarly, on Windows
        10 the default arrow style is <code><b>flatAngle7x4</b></code>,
        <code><b>flatAngle9x5</b></code>, <code><b>flatAngle11x6</b></code>,
        <code><b>flatAngle13x7</b></code>, or
        <code><b>flatAngle15x8</b></code>, and on Windows Vista, 7, and 8, the

        default chosen by Tablelist is <code><b>photo7x4</b></code>,
        <code><b>photo9x5</b></code>, <code><b>photo11x6</b></code>,
        <code><b>photo13x7</b></code>, or <code><b>photo15x8</b></code>,
        depending on the display's scaling level.</p>

        <p><img src="arrowStyles.png" alt="Arrow Styles" width="826" height=
        "113"></p>