Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Tablelist: Updated for version 7.5. See the ChangeLog for details. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6bd0090cf0dca79211ddbc77c4915fec |
User & Date: | csaba 2025-03-20 14:08:53.915 |
Original Comment: | Tablelist: Tablelist: Updated for version 7.5. See the ChangeLog for details. |
Context
2025-03-20
| ||
19:13 | Scrollutil: Updated for version 2.5. See the ChangeLog for details. check-in: 8d9c4fd92e user: csaba tags: trunk | |
14:08 | Tablelist: Updated for version 7.5. See the ChangeLog for details. check-in: 6bd0090cf0 user: csaba tags: trunk | |
2025-03-19
| ||
09:46 | Tsw: Minor improvements in the documentation. check-in: 56b88914a8 user: csaba tags: trunk | |
Changes
Changes to examples/tablelist/images.tcl.
1 2 3 | #============================================================================== # Creates some images. # | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #============================================================================== # Creates some images. # # Copyright (c) 2011-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Create two images, to be displayed in tablelist cells with boolean values # if {$::tk_version >= 8.7 || [catch {package require tksvg}] == 0} { set fmt $tablelist::svgfmt image create photo checkedImg -file [file join $dir checked.svg] \ -format $fmt image create photo uncheckedImg -file [file join $dir unchecked.svg] \ -format $fmt } else { set pct $tablelist::scalingpct |
︙ | ︙ |
Changes to examples/tablelist/tileWidgets.tcl.
1 2 3 4 5 6 | #! /usr/bin/env tclsh #============================================================================== # Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the tile package. # | | | > > > > > > > > > > | 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 | #! /usr/bin/env tclsh #============================================================================== # Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the tile package. # # Copyright (c) 2005-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require Tk package require tablelist_tile if {[tk windowingsystem] eq "x11" && ($::tk_version < 8.7 || [package vcompare $::tk_patchLevel "8.7a5"] <= 0)} { # # Patch the default theme's styles TCheckbutton and TRadiobutton # package require themepatch themepatch::patch default } wm title . "Serial Line Configuration" # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option_tile.tcl] option add *Tablelist*Spinbox.background white option add *Tablelist*Spinbox.readonlyBackground white foreach theme {alt clam classic default} { # # Configure the TSpinbox style # ttk::style theme settings $theme { ttk::style map TSpinbox -fieldbackground {readonly white} } } unset theme # # Create the images "checkedImg" and "uncheckedImg", as well as 16 images of # names like "img#FF0000", displaying colors identified by names like "red" # source [file join $dir images.tcl] |
︙ | ︙ |
Added examples/tablelist/tileWidgets2.tcl.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | #! /usr/bin/env tclsh #============================================================================== # Demonstrates the interactive tablelist cell editing with the aid of some Ttk # widgets and of the toggleswitch widget. # # Copyright (c) 2005-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require Tk package require tsw package require tablelist_tile if {[tk windowingsystem] eq "x11" && ($::tk_version < 8.7 || [package vcompare $::tk_patchLevel "8.7a5"] <= 0)} { # # Patch the default theme's styles TCheckbutton and TRadiobutton # package require themepatch themepatch::patch default } wm title . "Serial Line Configuration" # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option_tile.tcl] foreach theme {alt clam classic default} { # # Configure the TSpinbox style # ttk::style theme settings $theme { ttk::style map TSpinbox -fieldbackground {readonly white} } } unset theme # # Create the images "checkedImg" and "uncheckedImg", as well as 16 images of # names like "img#FF0000", displaying colors identified by names like "red" # source [file join $dir images.tcl] # # Register the toggleswitch widget for interactive cell editing # tablelist::addToggleswitch # # Improve the window's appearance by using a tile # frame as a container for the other widgets # set f [ttk::frame .f] # # Create a tablelist widget with editable columns (except the first one) # set tbl $f.tbl tablelist::tablelist $tbl \ -columns {0 "No." right 0 "Available" center 0 "Name" left 0 "Baud Rate" right 0 "Data Bits" center 0 "Parity" left 0 "Stop Bits" center 0 "Handshake" left 0 "Activation Date" center 0 "Activation Time" center 0 "Cable Color" center} \ -editstartcommand editStartCmd -editendcommand editEndCmd \ -aftercopycommand afterCopyCmd -height 0 -width 0 if {$isAwTheme && ![regexp {^(aw)?(arc|breeze.*)$} $currentTheme]} { $tbl configure -borderwidth 2 } if {[$tbl cget -selectborderwidth] == 0} { $tbl configure -spacing 1 } $tbl columnconfigure 0 -sortmode integer $tbl columnconfigure 1 -name available -editable yes \ -editwindow toggleswitch -formatcommand emptyStr \ -labelwindow ttk::checkbutton $tbl columnconfigure 2 -name lineName -editable yes -editwindow ttk::entry \ -allowduplicates 0 -sortmode dictionary $tbl columnconfigure 3 -name baudRate -editable yes -editwindow ttk::combobox \ -sortmode integer $tbl columnconfigure 4 -name dataBits -editable yes -editwindow ttk::spinbox $tbl columnconfigure 5 -name parity -editable yes -editwindow ttk::combobox $tbl columnconfigure 6 -name stopBits -editable yes -editwindow ttk::combobox $tbl columnconfigure 7 -name handshake -editable yes -editwindow ttk::combobox $tbl columnconfigure 8 -name actDate -editable yes -editwindow ttk::entry \ -formatcommand formatDate -sortmode integer $tbl columnconfigure 9 -name actTime -editable yes -editwindow ttk::entry \ -formatcommand formatTime -sortmode integer $tbl columnconfigure 10 -name color -editable yes \ -editwindow ttk::menubutton -formatcommand emptyStr proc emptyStr val { return "" } proc formatDate val { return [clock format $val -format "%Y-%m-%d"] } proc formatTime val { return [clock format $val -format "%H:%M:%S"] } # # Populate the tablelist widget and configure the checkbutton # embedded into the header label of the column "available" # source [file join $dir serialParams.tcl] set btn [ttk::button $f.btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 7p pack $tbl -side top -expand yes -fill both pack $f -expand yes -fill both #------------------------------------------------------------------------------ # editStartCmd # # Applies some configuration options to the edit window; if the latter is a # combobox, the procedure populates it. #------------------------------------------------------------------------------ proc editStartCmd {tbl row col text} { set w [$tbl editwinpath] switch [$tbl columncget $col -name] { lineName { # # Set an upper limit of 20 for the number of characters # $w configure -invalidcommand bell -validate key \ -validatecommand {expr {[string length %P] <= 20}} } baudRate { # # Populate the combobox and allow no more # than 6 digits in its entry component # $w configure -values {50 75 110 300 1200 2400 4800 9600 19200 38400 57600 115200 230400 460800 921600} $w configure -invalidcommand bell -validate key -validatecommand \ {expr {[string length %P] <= 6 && [regexp {^[0-9]*$} %S]}} } dataBits { # # Configure the spinbox # $w configure -from 5 -to 8 -state readonly } parity { # # Populate the combobox and make it non-editable # $w configure -values {None Even Odd Mark Space} -state readonly } stopBits { # # Populate the combobox and make it non-editable # $w configure -values {1 1.5 2} -state readonly } handshake { # # Populate the combobox and make it non-editable # $w configure -values {XON/XOFF RTS/CTS None} -state readonly } actDate { # # Set an upper limit of 10 for the number of characters # and allow only digits and the "-" character in it # $w configure -invalidcommand bell -validate key -validatecommand \ {expr {[string length %P] <= 10 && [regexp {^[0-9-]*$} %S]}} } actTime { # # Set an upper limit of 8 for the number of characters # and allow only digits and the ":" character in it # $w configure -invalidcommand bell -validate key -validatecommand \ {expr {[string length %P] <= 8 && [regexp {^[0-9:]*$} %S]}} } color { # # Populate the menu and make sure the menubutton will display the # color name rather than $text, which is "", due to -formatcommand # set menu [$w cget -menu] foreach name $::colorNames { $menu add radiobutton -compound left \ -image img$::colors($name) -label $name } $menu entryconfigure 8 -columnbreak 1 return [$tbl cellcget $row,$col -text] } } return $text } #------------------------------------------------------------------------------ # editEndCmd # # Performs a final validation of the text contained in the edit window and gets # the cell's internal content. #------------------------------------------------------------------------------ proc editEndCmd {tbl row col text} { switch [$tbl columncget $col -name] { available { # # Update the image contained in the cell and the checkbutton # embedded into the header label of the column "available" # set img [expr {$text ? "checkedImg" : "uncheckedImg"}] $tbl cellconfigure $row,$col -image $img after idle [list updateCkbtn $tbl $row $col] } baudRate { # # Check whether the baud rate is an integer in the range 50..921600 # if {![regexp {^[0-9]+$} $text] || $text < 50 || $text > 921600} { bell tk_messageBox -title "Error" -icon error -message \ "The baud rate must be an integer in the range 50..921600" $tbl rejectinput } } actDate { # # Get the activation date in seconds from the last argument # if {[catch {clock scan $text} actDate] != 0} { bell tk_messageBox -title "Error" -icon error -message "Invalid date" $tbl rejectinput return "" } # # Check whether the activation clock value is later than the # current one; if this is the case then make sure the cells # "actDate" and "actTime" will have the same internal value # set actTime [$tbl cellcget $row,actTime -text] set actClock [clock scan [formatTime $actTime] -base $actDate] if {$actClock <= [clock seconds]} { bell tk_messageBox -title "Error" -icon error -message \ "The activation date & time must be in the future" $tbl rejectinput } else { $tbl cellconfigure $row,actTime -text $actClock return $actClock } } actTime { # # Get the activation clock value in seconds from the last argument # set actDate [$tbl cellcget $row,actDate -text] if {[catch {clock scan $text -base $actDate} actClock] != 0} { bell tk_messageBox -title "Error" -icon error -message "Invalid time" $tbl rejectinput return "" } # # Check whether the activation clock value is later than the # current one; if this is the case then make sure the cells # "actDate" and "actTime" will have the same internal value # if {$actClock <= [clock seconds]} { bell tk_messageBox -title "Error" -icon error -message \ "The activation date & time must be in the future" $tbl rejectinput } else { $tbl cellconfigure $row,actDate -text $actClock return $actClock } } color { # # Update the image contained in the cell # $tbl cellconfigure $row,$col -image img$::colors($text) } } return $text } |
Changes to modules/tablelist/CHANGES.txt.
|
| | > > > > > > > > > > > > > > > > > > > > > > | | 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 | What is new in Tablelist 7.5? ----------------------------- 1. Support for interactive cell editing with the aid of the new toggleswitch widget. 2. Improvements related to the use of various system colors on aqua and win32. 3. The scaleutil package now also scales the "-sashthickness" and "-gripsize" options of the "Sash" style. 4. New demo script "tileWidgets2.tcl", in which toggleswitch rather than ttk::checkbutton widgets are used for the editing of boolean values. 5. Made the retrieval of the row index corresponding to a given viewable row offset more robust (thanks to Alexandru Dadalau for his bug report). 6. Fixed a bug related to the "-allowduplicates" column configuration option and the "-forceeditendcommand" global option. What was new in Tablelist 7.4.1? -------------------------------- 1. Optimization: The "-window" cell configuration option no longer performs a window update if the new option value equals the old one (thanks to Nicolas Bats for his proposal). 2. Eliminated a negative side effect of the optimization of "cellconfigure -image|text" introduced in Tablelist 7.4, related to |
︙ | ︙ |
Changes to modules/tablelist/COPYRIGHT.txt.
|
| | | 1 2 3 4 5 6 7 8 | Multi-column listbox and tree widget package Tablelist, version 7.5 Copyright (c) 2000-2024 Csaba Nemethi (E-mail: [email protected]) This library is free software; you can use, modify, and redistribute it for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. |
︙ | ︙ |
Changes to modules/tablelist/ChangeLog.
1 2 3 4 5 6 7 | 2024-12-03 Csaba Nemethi <[email protected]> * Released Tablelist 7.4.1. 2024-12-03 Csaba Nemethi <[email protected]> * *.tcl: Bumped the version number to 7.4.1. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | 2025-03-20 Csaba Nemethi <[email protected]> * *.tcl: Bumped the version number to 7.5. * COPYRIGHT.txt: * README.txt: * CHANGES.txt: Updated to reflect the changes. * doc/*.html: * scripts/*.tcl: Added support for interactive cell editing with the aid of the new toggleswitch widget; improvements related to the use of various system colors on aqua and win32; made the retrieval of the row index corresponding to a given viewable row offset more robust; fixed a bug related to the "-allowduplicates" column configuration option and the "-forceeditendcommand" global option. * scripts/tclIndex: Newly generated. * scripts/utils/*.tcl: Extensions in the packages mwutil and scaleutil. * doc/tileWidgets2.png: Added screenshot. * ../../examples/tablelist/images.tcl: Minor improvements. * ../../examples/tablelist/tileWidgets.tcl: * ../../examples/tablelist/tileWidgets2.tcl: Added demo script using the new toggleswitch widget. 2024-12-03 Csaba Nemethi <[email protected]> * Released Tablelist 7.4.1. 2024-12-03 Csaba Nemethi <[email protected]> * *.tcl: Bumped the version number to 7.4.1. |
︙ | ︙ |
Changes to modules/tablelist/README.txt.
︙ | ︙ | |||
22 23 24 25 26 27 28 | used as multi-column listbox; - a demo script implementing a widget browser based on a tablelist used as multi-column tree widget; - a demo script implementing a directory viewer based on a tablelist used as multi-column tree widget; - a demo script showing several ways to improve the appearance of a tablelist widget; | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | used as multi-column listbox; - a demo script implementing a widget browser based on a tablelist used as multi-column tree widget; - a demo script implementing a directory viewer based on a tablelist used as multi-column tree widget; - a demo script showing several ways to improve the appearance of a tablelist widget; - five further demo scripts, illustrating the interactive cell editing with the aid of various widgets from the Tk core and from the packages tile, BWidget, Iwidgets, combobox (by Bryan Oakley), Mentry, and Tsw; - one further demo script, with a tablelist widget containing embedded windows; - tile-based counterparts of the above-mentioned demo scripts; - a tutorial in HTML format; - reference pages in HTML format. A tablelist is a multi-column listbox and tree widget. The width of |
︙ | ︙ | |||
52 53 54 55 56 57 58 | The Tablelist package provides a great variety of tree styles controlling the look & feel of the column that displays the tree hierarchy with the aid of indentations and expand/collapse controls. Interactive editing of the elements of a tablelist widget can be enabled for individual cells and for entire columns. A great variety of widgets from the Tk core and from the packages tile, BWidget, | | | | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | The Tablelist package provides a great variety of tree styles controlling the look & feel of the column that displays the tree hierarchy with the aid of indentations and expand/collapse controls. Interactive editing of the elements of a tablelist widget can be enabled for individual cells and for entire columns. A great variety of widgets from the Tk core and from the packages tile, BWidget, Iwidgets, combobox, ctext, Mentry (or Mentry_tile), and Tsw is supported for being used as embedded edit window. In addition, a rich set of keyboard bindings is provided for a comfortable navigation between the editable cells. The Tcl command corresponding to a tablelist widget is very similar to the one associated with a normal listbox. There are column-, row-, and cell-specific counterparts of the "configure" and "cget" subcommands ("columnconfigure", "rowconfigure", "cellconfigure", ...). They can be used, among others, to insert images and embedded windows into the cells and the header labels. The "index", "nearest", and "see" command |
︙ | ︙ | |||
84 85 86 87 88 89 90 | https://www.nemethi.de How to Get It? -------------- Tablelist is available for free download from the same URL as Wcb. The | | | | < < | | | | | | | | | | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | https://www.nemethi.de How to Get It? -------------- Tablelist is available for free download from the same URL as Wcb. The distribution file is "tablelist7.5.tar.gz" for UNIX and "tablelist7_5.zip" for Windows. These files contain the same information, except for the additional carriage return character preceding the linefeed at the end of each line in the text files for Windows. Tablelist is also included in tklib, which has the address https://core.tcl.tk/tklib How to Install It? ------------------ Install the package as a subdirectory of one of the directories given by the "auto_path" variable. For example, you can install it as a subdirectory of the "lib" directory within your Tcl/Tk installation. To install Tablelist on UNIX, "cd" to the desired directory and unpack the distribution file "tablelist7.5.tar.gz": gunzip -c tablelist7.5.tar.gz | tar -xf - On most UNIX systems this can be replaced with tar -zxf tablelist7.5.tar.gz Both commands will create a directory named "tablelist7.5 with the subdirectories "demos", "doc", and "scripts". On Windows, use WinZip or some other program capable of unpacking the distribution file "tablelist7_5.zip" into the directory "tablelist7.5", with the subdirectories "demos", "doc", and "scripts". The file "tablelistEdit.tcl" in the "scripts" directory is only needed for applications making use of interactive cell editing. Similarly, the file "tablelistMove.tcl" in the same directory is only required for scripts invoking the "move" or "movecolumn" tablelist command. Finally, the file "tablelistThemes.tcl" is only needed for applications using the Tablelist_tile package (see next section). How to Use It? -------------- The Tablelist distribution provides two packages, called Tablelist and Tablelist_tile. The main difference between the two is that Tablelist_tile enables the tile-based, theme-specific appearance of tablelist widgets; this package requires tile 0.6 or higher. It is not possible to use both packages in one and the same application, because both are implemented in the same "tablelist" namespace and provide identical commands. To be able to use the commands and variables implemented in the Tablelist package, your scripts must contain one of the lines package require tablelist ?version? package require Tablelist ?version? Likewise, to be able to use the commands and variables implemented in the Tablelist_tile package, your scripts must contain one of the lines package require tablelist_tile ?version? package require Tablelist_tile ?version? Since the packages Tablelist and Tablelist_tile are implemented in the "tablelist" namespace, you must either import the procedures you need, or use qualified names like "tablelist::tablelist". For a detailed description of the commands and variables provided by Tablelist and of the examples contained in the "demos" directory, see the tutorial "tablelist.html" and the reference pages, all located in the "doc" directory. |
Changes to modules/tablelist/doc/index.html.
1 2 3 | <!DOCTYPE html> <html> <head> | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <!DOCTYPE html> <html> <head> <title>The Multi-Column Listbox and Tree Widget Package Tablelist 7.5</title> <meta name="Author" content="Csaba Nemethi"> <meta name="Keywords" content= "tablelist, multi-column, listbox, tree, widget, tile"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>The Multi-Column Listbox and Tree Widget Package Tablelist 7.5</h1> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
56 57 58 59 60 61 62 63 64 | the combobox Package</a></p> <p><a href="tablelistCtext.html">Interactive Tablelist Cell Editing Using the ctext Package</a></p> <p><a href="tablelistMentry.html">Interactive Tablelist Cell Editing Using the Mentry Package</a></p> </body> </html> | > > > | 56 57 58 59 60 61 62 63 64 65 66 67 | the combobox Package</a></p> <p><a href="tablelistCtext.html">Interactive Tablelist Cell Editing Using the ctext Package</a></p> <p><a href="tablelistMentry.html">Interactive Tablelist Cell Editing Using the Mentry Package</a></p> <p><a href="tablelistTsw.html">Interactive Tablelist Cell Editing Using the Tsw Package</a></p> </body> </html> |
Changes to modules/tablelist/doc/tablelist.html.
︙ | ︙ | |||
10 11 12 13 14 15 16 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Tablelist Programmer's Guide</h1> | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Tablelist Programmer's Guide</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
102 103 104 105 106 107 108 | <li>a demo script implementing a directory viewer based on a tablelist used as multi-column tree widget;</li> <li>a demo script showing several ways to improve the appearance of a tablelist widget;</li> | | | | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | <li>a demo script implementing a directory viewer based on a tablelist used as multi-column tree widget;</li> <li>a demo script showing several ways to improve the appearance of a tablelist widget;</li> <li>five further demo scripts, illustrating the interactive cell editing with the aid of various widgets from the Tk core and from the packages tile, BWidget, Iwidgets, combobox (by Bryan Oakley), Mentry, and Tsw;</li> <li>one further demo script, with a tablelist widget containing embedded windows;</li> <li>tile-based counterparts of the above-mentioned demo scripts;</li> <li>this tutorial;</li> |
︙ | ︙ | |||
175 176 177 178 179 180 181 | <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. | | | | | < | < < | | | | | | | | | | | | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | <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. The distribution file is <code>tablelist7.5.tar.gz</code> for UNIX and <code>tablelist7_5.zip</code> for Windows. These files contain the same information, except for the additional carriage return character preceding the linefeed at the end of each line in the text files for Windows.</p> <p>Tablelist is also included in tklib, which has the address</p> <blockquote> <address> <a href="https://core.tcl.tk/tklib">https://core.tcl.tk/tklib</a> </address> </blockquote> <h3 id="ov_install">How to Install It?</h3> <p>Install the package as a subdirectory of one of the directories given by the <code>auto_path</code> variable. For example, you can install it as a subdirectory of the <code>lib</code> directory within your Tcl/Tk installation.</p> <p>To install Tablelist <i>on UNIX</i>, <code>cd</code> to the desired directory and unpack the distribution file <code>tablelist7.5.tar.gz</code>:</p> <blockquote> <pre> gunzip -c tablelist7.5.tar.gz | tar -xf - </pre> </blockquote> <p>On most UNIX systems this can be replaced with</p> <blockquote> <pre> tar -zxf tablelist7.5.tar.gz </pre> </blockquote> <p>Both commands will create a directory named <code>tablelist7.5</code>, with the subdirectories <code>demos</code>, <code>doc</code>, and <code>scripts</code>.</p> <p><i>On Windows</i>, use WinZip or some other program capable of unpacking the distribution file <code>tablelist7_5.zip</code> into the directory <code>tablelist7.5</code>, with the subdirectories <code>demos</code>, <code>doc</code>, and <code>scripts</code>.</p> <p>The file <code>tablelistEdit.tcl</code> in the <code>scripts</code> directory is only needed for applications making use of interactive cell editing. Similarly, the file <code>tablelistMove.tcl</code> in the same directory is only required for scripts invoking the <code>move</code> or <code>movecolumn</code> command. Finally, the file <code>tablelistThemes.tcl</code> is only needed for applications using the Tablelist_tile package (see next section).</p> <p>Notice that in tklib the Tablelist <code>demos</code> directory is replaced with the subdirectory <code>tablelist</code> of the <code>examples</code> directory. Please take this into account when reading the <a href="#examples">examples</a> below.</p> <h3 id="ov_use">How to Use It?</h3> <p>The Tablelist distribution provides two packages, called <b>Tablelist</b> and <b>Tablelist_tile</b>. The main difference between the two is that Tablelist_tile enables the tile-based, theme-specific appearance of tablelist widgets; this package requires tile 0.6 or higher. It is not possible to use both packages in one and the same application, because both are implemented in the same <code>tablelist</code> namespace and provide identical commands.</p> <p>To be able to access the commands and variables defined in the Tablelist package, your scripts must contain one of the lines</p> <blockquote> <pre> package require tablelist ?<i>version</i>? package require Tablelist ?<i>version</i>? </pre> </blockquote> <p>You can use either one of the two statements above because the file <code>tablelist.tcl</code> contains both lines</p> <blockquote> <pre> package provide tablelist ... package provide Tablelist ... </pre> </blockquote> <p>Likewise, to be able to access the commands and variables defined in the Tablelist_tile package, your scripts must contain one of the lines</p> <blockquote> <pre> package require tablelist_tile ?<i>version</i>? package require Tablelist_tile ?<i>version</i>? </pre> </blockquote> |
︙ | ︙ | |||
321 322 323 324 325 326 327 | <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> is set when | | | 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | <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> is set when loading the Tablelist or Tablelist_tile package via <code>package require</code> to the scaling percentage corresponding to the display's DPI scaling level. Tablelist adapts, among others, the default sort arrow style on X11 and 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. The currently supported values are <code>100</code>, <code>125</code>, <code>150</code>, |
︙ | ︙ | |||
348 349 350 351 352 353 354 | properly scaled.</li> <li>The boolean variable <code>tablelist::strictTk</code> (having the default value <code>0</code>) controls the strict listbox-compatibility of the default bindings.</li> <li>The read-only boolean variable <code>tablelist::usingTile</code> has | | | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | properly scaled.</li> <li>The boolean variable <code>tablelist::strictTk</code> (having the default value <code>0</code>) controls the strict listbox-compatibility of the default bindings.</li> <li>The read-only boolean variable <code>tablelist::usingTile</code> has the value <code>0</code> in the Tablelist package and the value <code>1</code> in Tablelist_tile.</li> <li>In Tablelist_tile the array <code>tablelist::themeDefaults</code> holds the theme-specific default values of a series of Tablelist configuration options.</li> </ul> |
︙ | ︙ | |||
534 535 536 537 538 539 540 | <li class="tm">the default length of the ttk::scale and ttk::progressbar widgets;</li> <li class="tm">for the built-in themes <code>alt</code> and <code>default</code>, some styling options of the ttk::scrollbar, ttk::scale, ttk::progressbar, ttk::combobox, ttk::spinbox, ttk::button, toolbutton, ttk::menubutton, ttk::checkbutton, ttk::radiobutton, | | | | | | | | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | <li class="tm">the default length of the ttk::scale and ttk::progressbar widgets;</li> <li class="tm">for the built-in themes <code>alt</code> and <code>default</code>, some styling options of the ttk::scrollbar, ttk::scale, ttk::progressbar, ttk::combobox, ttk::spinbox, ttk::button, toolbutton, ttk::menubutton, ttk::checkbutton, ttk::radiobutton, ttk::notebook, ttk::panedwindow, and ttk::treeview widgets;</li> <li class="tm">for the built-in theme <code>clam</code>, some styling options of the ttk::scrollbar, ttk::scale, ttk::progressbar, ttk::combobox, ttk::spinbox, ttk::button, toolbutton, ttk::menubutton, ttk::checkbutton, ttk::radiobutton, ttk::notebook, ttk::panedwindow, ttk::treeview, and ttk::labelframe widgets;</li> <li class="tm">for the built-in theme <code>classic</code>, some styling options of the ttk::scrollbar, ttk::scale, ttk::progressbar, ttk::combobox, ttk::spinbox, ttk::button, toolbutton, ttk::menubutton, ttk::checkbutton, ttk::radiobutton, ttk::notebook, ttk::panedwindow, and ttk::treeview widgets;</li> <li class="tm">for the built-in theme <code>vista</code>, some styling options of the ttk::combobox, ttk::button, toolbutton, ttk::menubutton, ttk::checkbutton, ttk::radiobutton, ttk::notebook, ttk::panedwindow, and ttk::treeview widgets;</li> <li class="tm">for the built-in theme <code>winnative</code>, some styling options of the ttk::scale, ttk::progressbar, ttk::combobox, ttk::spinbox, toolbutton, ttk::menubutton, ttk::checkbutton, ttk::radiobutton, ttk::notebook, ttk::panedwindow, and ttk::treeview widgets;</li> <li class="tm">for the built-in theme <code>xpnative</code>, some styling options of the ttk::combobox, ttk::spinbox, ttk::button, toolbutton, ttk::menubutton, ttk::checkbutton, ttk::radiobutton, ttk::notebook, ttk::panedwindow, and ttk::treeview widgets.</li> </ul> <p>In addition, the procedure <code>scaleutil::scalingPercentage</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. (A long-standing bug in the implementation of these widgets was fixed in May |
︙ | ︙ | |||
623 624 625 626 627 628 629 | has a rather complex structure, consisting, among others, of frame and label widgets. While in the Tablelist package all of these components are Tk widgets, the Tablelist_tile package uses both Tk and tile frame and label widgets. Due to several incompatibilities between Tk and tile, it is currently not possible to replace all Tk widgets making up a tablelist with their tile counterparts.</p> | | | | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | has a rather complex structure, consisting, among others, of frame and label widgets. While in the Tablelist package all of these components are Tk widgets, the Tablelist_tile package uses both Tk and tile frame and label widgets. Due to several incompatibilities between Tk and tile, it is currently not possible to replace all Tk widgets making up a tablelist with their tile counterparts.</p> <p>From the above it follows that <b>the Tablelist_tile package will only work as expected if the Tk <code>frame</code> and <code>label</code> commands haven't been overridden by using <code>namespace import -force ttk::*</code> at global scope</b>. While earlier tile releases suggested using this command at global scope for the really adventurous, in newer tile versions this is considered a Really Bad Idea, causing many things to break. Instead, <b>you should explicitly invoke <code>ttk::frame</code>, <code>ttk::label</code>, etc. whenever you want to use a tile widget</b>.</p> <p><b>Overriding some other Tk widgets at global scope may be equally dangerous when using various widgets from the Tk core and from the packages BWidget, Iwidgets, combobox (by Bryan Oakley), ctext, and Mentry for interactive cell editing</b>, because these packages expect Tk widgets, which may not always be replaced by their tile counterparts.</p> <p>Another restriction to be taken into account is due to the fact that in earlier tile versions the <code>(ttk::)style theme use</code> command could only be used to set the current theme, but not to retrieve it. For this reason, if the Tablelist_tile package cannot get the current theme with the aid of <code>ttk::style theme use</code> then it makes use of the variable <code>ttk::currentTheme</code> or <code>tile::currentTheme</code> (depending on the tile version), which is set by the <code>ttk::setTheme</code> or <code>tile::setTheme</code> command. From this it follows that <b>if the tile version being used doesn't support the <code>ttk::style theme use</code> command without an argument then the tile-based tablelist widgets will only have the |
︙ | ︙ | |||
2794 2795 2796 2797 2798 2799 2800 | } return $text } </pre> </blockquote> | | | | < | 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 | } return $text } </pre> </blockquote> <p>Instead of making the "Available" column editable via a <i>temporary</i> checkbutton and displaying the images <code>"checkedImg"</code> and <code>"uncheckedImg"</code> in its cells, we can use the <code><a href= "tablelistWidget.html#embedcheckbuttons">embedcheckbuttons</a></code> subcommand to populate the column with <i>persistently</i> embedded checkbuttons. The necessary changes are as follows:</p> <ul> <li class="tm">Remove those parts of the code above that are shown in <span class="red">red</span> color.</li> |
︙ | ︙ | |||
3287 3288 3289 3290 3291 3292 3293 | with Tablelist (but, contrary to the scaleutil package, it is not used by the Tablelist code and therefore it needs to be loaded explicitly via <code>package require themepatch</code>):</p> <blockquote> <pre> if {[tk windowingsystem] eq "x11" && | | > > > > > > > > > > | 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 | with Tablelist (but, contrary to the scaleutil package, it is not used by the Tablelist code and therefore it needs to be loaded explicitly via <code>package require themepatch</code>):</p> <blockquote> <pre> if {[tk windowingsystem] eq "x11" && ($::tk_version < 8.7 || [package vcompare $::tk_patchLevel "8.7a5"] <= 0)} { # # Patch the default theme's styles TCheckbutton and TRadiobutton # package require themepatch themepatch::patch default } </pre> </blockquote> <p>Due to this (optional) step, the scalable ttk::checkbutton widgets used in the colum "Available" have a modern look and behavior, just like the ones of the themes <code>aqua</code> and <code>vista</code>.</p> <p>The demo script <code>tileWidgets2.tcl</code> differs from <code>tileWidgets.tcl</code> mainly in the fact that it uses the toggleswitch widget from the Tsw package rather than the ttk::checkbutton for editing the elements of the "Available" column:</p> <blockquote> <img src="tileWidgets2.png" alt="Serial Line Configuration" width="801" height="449"> </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. Please take a look at the file <code>embeddedWindows_tile.tcl</code> in the <code>demos</code> directory for the details. Here is a screenshot of the resulting window:</p> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistBWidget.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the BWidget Package</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the BWidget Package</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistBinding.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands Related to Binding Scripts</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands Related to Binding Scripts</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistColSort.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands for Interactive Sorting by One or More Columns</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands for Interactive Sorting by One or More Columns</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistCombobox.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the combobox Package</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the combobox Package</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistCtext.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the ctext Package</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the ctext Package</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistIwidgets.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the Iwidgets Package</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the Iwidgets Package</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistMentry.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the Mentry Package</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using the Mentry Package</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
69 70 71 72 73 74 75 | </blockquote> <p>Starting with version 3.0, the Mentry distribution provides not only the package Mentry, but also its tile-based equivalent Mentry_tile, which enables the theme-specific appearance of mentry widgets; this package requires Tcl/Tk 8.4 or higher and tile 0.6 or higher.</p> | | | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | </blockquote> <p>Starting with version 3.0, the Mentry distribution provides not only the package Mentry, but also its tile-based equivalent Mentry_tile, which enables the theme-specific appearance of mentry widgets; this package requires Tcl/Tk 8.4 or higher and tile 0.6 or higher.</p> <p>Tablelist supports interactive cell editing with the aid of mentry widgets of type <code>"Date"</code>, <code>"Time"</code>, <code>"DateTime</code>, <code>"FixedPoint"</code>, <code>"IPAddr"</code>, and <code>"IPv6Addr"</code>. The steps needed for using one of these widgets for editing the cells of a given column are as follows:</p> <ol> <li>Register the desired widget for interactive cell editing by invoking one of the commands described in this reference page.</li> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistThemes.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands Related to Tile Themes</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands Related to Tile Themes</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistTile.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using Tile Widgets</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using Tile Widgets</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistTkCore.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using Tk Core Widgets</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Interactive Tablelist Cell Editing Using Tk Core Widgets</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/tablelist/doc/tablelistWidget.html.
︙ | ︙ | |||
10 11 12 13 14 15 16 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>The <code><b>tablelist::tablelist</b></code> Command</h1> | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>The <code><b>tablelist::tablelist</b></code> Command</h1> <h2>For Tablelist Version 7.5</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
1541 1542 1543 1544 1545 1546 1547 | <dd class="tm">The elements of a tablelist widget can, per default, be only edited programmatically. However, interactive editing can be enabled for individual cells and for entire columns of the widget's body. Per default, the interactive cell editing uses a temporary embedded entry widget, thus making sure that all the validation facilities available for entry widgets can be used during the editing process. A great variety of widgets from the packages BWidget, Iwidgets, combobox (by Bryan Oakley), | | | 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 | <dd class="tm">The elements of a tablelist widget can, per default, be only edited programmatically. However, interactive editing can be enabled for individual cells and for entire columns of the widget's body. Per default, the interactive cell editing uses a temporary embedded entry widget, thus making sure that all the validation facilities available for entry widgets can be used during the editing process. A great variety of widgets from the packages BWidget, Iwidgets, combobox (by Bryan Oakley), ctext, Mentry (or Mentry_tile), and Tsw, as well as Tk core text, spinbox, checkbutton, and menubutton widgets, along with tile entry, spinbox, combobox, checkbutton, and menubutton widgets are also supported as temporary embedded widgets used for cell editing. In addition, a rich set of keyboard bindings is provided for a comfortable navigation between the editable cells.</dd> <dd class="tm">When first created, a new tablelist widget has no |
︙ | ︙ | |||
2807 2808 2809 2810 2811 2812 2813 | <td>Database Class:</td> <td><code><b> InstantToggle</b></code></td> </tr> </table> <blockquote> <p>Specifies a boolean value that controls whether the interactive cell | | | | > | | | | | 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 | <td>Database Class:</td> <td><code><b> InstantToggle</b></code></td> </tr> </table> <blockquote> <p>Specifies a boolean value that controls whether the interactive cell editing with the aid of a Tk or tile checkbutton or a toggleswitch widget, if started with the left mouse button, will be finished immediately after automatically toggling the check state of the temporary embedded checkbutton or the switch state of the temporary embedded toggleswitch. The default value is <code>0</code>, meaning that a mouse click into the cell will only start the editing session (and automatically toggle the checkbutton's check state or the toggleswitch widget's switch state), but not also finish it.</p> </blockquote> </dd> <dd id="itembackground"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Command-Line Name: </td> |
︙ | ︙ | |||
5976 5977 5978 5979 5980 5981 5982 | <code><b>ttk::checkbutton</b></code>, or <code><b>ttk::menubutton</b></code> (the latter five only in the presence of the tile widget engine), or the value returned by one of the registration commands for widgets from the packages <a href= "tablelistBWidget.html">BWidget</a>, <a href= "tablelistIwidgets.html">Iwidgets</a>, <a href= "tablelistCombobox.html">combobox</a> (by Bryan Oakley), <a href= | | | | | | | 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 | <code><b>ttk::checkbutton</b></code>, or <code><b>ttk::menubutton</b></code> (the latter five only in the presence of the tile widget engine), or the value returned by one of the registration commands for widgets from the packages <a href= "tablelistBWidget.html">BWidget</a>, <a href= "tablelistIwidgets.html">Iwidgets</a>, <a href= "tablelistCombobox.html">combobox</a> (by Bryan Oakley), <a href= "tablelistCtext.html">ctext</a>, <a href="tablelistMentry.html">Mentry (or Mentry_tile)</a>, and <a href="tablelistTsw.html">Tsw</a>. For example, you can use <code><b>-editwindow ComboBox</b></code> <i>after</i> registering the ComboBox widget for interactive cell editing with the aid of the <code><b><a href= "tablelistBWidget.html#ComboBox">tablelist::addBWidgetComboBox</a></b></code> command. Similarly, you can use <code><b>-editwindow combobox</b></code> <i>after</i> registering Bryan Oakley's combobox widget for interactive cell editing by invoking the <code><b><a href= "tablelistCombobox.html#combobox">tablelist::addOakleyCombobox</a></b></code> command. The value of this option can be overridden for |
︙ | ︙ | |||
7316 7317 7318 7319 7320 7321 7322 | <code>KP_Enter</code>. Per default, the <code><b>editcell</b></code> subcommand creates a temporary entry widget and embeds it into the cell whose index was passed to it as argument. You can, however, use the <code><b>-editwindow</b></code> <a href="#col_editwindow">column</a> or <a href="#cell_editwindow">cell</a> configuration option to specify another widget instead of an entry, like a Tk core text, spinbox, checkbutton, or menubutton widget, or a tile entry, spinbox, combobox, checkbutton, or | | | | | | | | | | 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 | <code>KP_Enter</code>. Per default, the <code><b>editcell</b></code> subcommand creates a temporary entry widget and embeds it into the cell whose index was passed to it as argument. You can, however, use the <code><b>-editwindow</b></code> <a href="#col_editwindow">column</a> or <a href="#cell_editwindow">cell</a> configuration option to specify another widget instead of an entry, like a Tk core text, spinbox, checkbutton, or menubutton widget, or a tile entry, spinbox, combobox, checkbutton, or menubutton, or one of the 20 currently supported widgets from the packages <a href="tablelistBWidget.html">BWidget</a>, <a href= "tablelistIwidgets.html">Iwidgets</a>, <a href= "tablelistCombobox.html">combobox</a> (by Bryan Oakley), <a href= "tablelistCtext.html">ctext</a>, <a href="tablelistMentry.html">Mentry (or Mentry_tile)</a>, and <a href="tablelistTsw.html">Tsw</a>. Before specifying a widget from one of these library packages as the value of the <code><b>-editwindow</b></code> column or cell configuration option, you must register it for interactive cell editing by invoking the corresponding <code><b>tablelist::add*</b></code> command. The above-mentioned Tk core and tile widgets are automatically registered for cell editing.</dd> <dd class="tm">In the simplest case, the text automatically inserted into the temporary embedded widget is the same as the text displayed in the cell, which in turn can be the cell's content or the string obtained from the latter by using the <code><b><a href= "#col_formatcommand">-formatcommand</a></b></code> option of the cell's column. However, if the value of the <code><b><a href= |
︙ | ︙ | |||
7391 7392 7393 7394 7395 7396 7397 | the keys used for normal termination of the editing just invoke the <code><b><a href="#finishediting">finishediting</a></b></code> subcommand; the latter can also be called explicitly to terminate the editing programmatically. Normal termination is also triggered by clicking with the left mouse button anywhere in the tablelist's body, outside the cell just being edited, or moving into another editable cell by using keyboard navigation. If the editing was started with the left mouse | | > | | | | | | 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 | the keys used for normal termination of the editing just invoke the <code><b><a href="#finishediting">finishediting</a></b></code> subcommand; the latter can also be called explicitly to terminate the editing programmatically. Normal termination is also triggered by clicking with the left mouse button anywhere in the tablelist's body, outside the cell just being edited, or moving into another editable cell by using keyboard navigation. If the editing was started with the left mouse button, the edit window is a Tk or tile checkbutton or a toggleswitch widget, and the value of the <code><b><a href= "#instanttoggle">-instanttoggle</a></b></code> option is true, then the normal termination of the editing will take place automatically, without any user interaction. Similarly, if the edit window is one of the four combobox widgets supported by Tablelist or a (ttk::)menubutton widget, and the value of the <code><b><a href= "#autofinishediting">-autofinishediting</a></b></code> option is true, then selecting a combobox or menu entry will automatically terminate the editing session. Finally, if the value of the <code><b><a href= "#editendonfocusout">-editendonfocusout</a></b></code> option is true then normal termination is also triggered when the tablelist widget loses the focus.</dd> |
︙ | ︙ | |||
9534 9535 9536 9537 9538 9539 9540 | <b>editwintag</b></code></dt> <dd>Returns the name of a binding tag whose name depends on the path name of the tablelist widget and which is associated with some of the components of the temporary embedded widget used for interactive cell editing. These components depend on the edit window: the widget itself in case of a Tk or tile checkbutton or menubutton; the edit | | > | | 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 | <b>editwintag</b></code></dt> <dd>Returns the name of a binding tag whose name depends on the path name of the tablelist widget and which is associated with some of the components of the temporary embedded widget used for interactive cell editing. These components depend on the edit window: the widget itself in case of a Tk or tile checkbutton or menubutton; the edit window's entry children in case of a mentry widget; the ttk::scale widget contained in a toggleswitch used as edit window; the only entry or entry-like component of the edit window in all other cases (see also the <code><b><a href="#entrypath">entrypath</a></b></code> subcommand). This binding tag precedes the tag <code><b><a href= "#edit_bindings">TablelistEdit</a></b></code> in the list of binding tags of the edit window components mentioned above, and is designed to be used when defining individual binding scripts for controlling the interactive cell editing.</dd> |
︙ | ︙ | |||
9626 9627 9628 9629 9630 9631 9632 | <b>entrypath</b></code></dt> <dd>Returns the path name of the entry or entry-like component of the temporary embedded widget used for interactive cell editing, created by the <code><b><a href="#editcell">editcell</a></b></code> subcommand. If no cell is currently being edited or the editing is taking place with the aid of a Tk or tile checkbutton, Tk or tile | | | | | | | | | | 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 | <b>entrypath</b></code></dt> <dd>Returns the path name of the entry or entry-like component of the temporary embedded widget used for interactive cell editing, created by the <code><b><a href="#editcell">editcell</a></b></code> subcommand. If no cell is currently being edited or the editing is taking place with the aid of a Tk or tile checkbutton, Tk or tile menubutton, mentry, or toggleswitch widget, then the return value is an empty string; otherwise it is the path name of a Tk or tile entry, text or ctext, Tk or tile spinbox, or BWidget Entry widget, which can be the edit window itself or one of its descendants. This subcommand enables you to access the entry or entry-like component of the temporary embedded widget from within the commands specified by the <code><b><a href="#editstartcommand">-editstartcommand</a></b></code> and <code><b><a href="#editendcommand">-editendcommand</a></b></code> configuration options.</dd> <dt class="tm" id="expand"><code><i>pathName</i> <b>expand</b> <i>indexList</i> ?<b>-fully</b>|<b>-partly</b>?</code></dt> <dd>This subcommand expands the specified rows of a tablelist used as a tree widget, i.e., makes all their children visible. The optional |
︙ | ︙ | |||
9770 9771 9772 9773 9774 9775 9776 | <dd class="tm">This subcommand is called <i>implicitly</i> by pressing <code>Return</code> or <code>KP_Enter</code> (together with <code>Control</code> if the edit window is a text or ctext widget) when editing a cell, or by clicking with the left mouse button anywhere in the tablelist's body, outside the cell just being edited, or moving into another editable cell by using keyboard navigation. If the editing was started with the left mouse button, the edit window is a Tk | | | | | | | | 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 | <dd class="tm">This subcommand is called <i>implicitly</i> by pressing <code>Return</code> or <code>KP_Enter</code> (together with <code>Control</code> if the edit window is a text or ctext widget) when editing a cell, or by clicking with the left mouse button anywhere in the tablelist's body, outside the cell just being edited, or moving into another editable cell by using keyboard navigation. If the editing was started with the left mouse button, the edit window is a Tk or tile checkbutton or a toggleswitch widget, and the value of the <code><b><a href= "#instanttoggle">-instanttoggle</a></b></code> option is true, then this subcommand will be invoked automatically, without any user interaction. Similarly, if the edit window is one of the four combobox widgets supported by Tablelist or a (ttk::)menubutton widget, and the value of the <code><b><a href= "#autofinishediting">-autofinishediting</a></b></code> option is true, then selecting a combobox or menu entry will automatically invoke this subcommand and thus terminate the editing session. Finally, if the value of the <code><b><a href= "#editendonfocusout">-editendonfocusout</a></b></code> option is true then this subcommand will also be invoked automatically when the tablelist widget loses the focus.</dd> |
︙ | ︙ | |||
12304 12305 12306 12307 12308 12309 12310 | <code><b>browse</b></code> modes, in which case it selects the active item or element (depending on the selection type) and deselects everything else. <p><b>REMARK 1:</b> The default widget bindings in current Tk versions on Windows already support <code>Control-a</code> as an alternative to <code>Control-slash</code>. In Tablelist this is | | | | 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 | <code><b>browse</b></code> modes, in which case it selects the active item or element (depending on the selection type) and deselects everything else. <p><b>REMARK 1:</b> The default widget bindings in current Tk versions on Windows already support <code>Control-a</code> as an alternative to <code>Control-slash</code>. In Tablelist this is valid on X11, too.</p> <p><b>REMARK 2:</b> On Mac OS X/11+, the default widget bindings in current Tk versions use the key sequence <code>Command-a</code> <i>instead of</i> <code>Control-slash</code>.</p> </li> <li class="tm"> <code>Shift-Control-A</code> behaves the same as <code>Control-backslash</code>, i.e., it deselects everything in the widget, except in <code><b>browse</b></code> mode, where it has no effect. <p><b>REMARK 1:</b> This shortcut comes in handy on Windows when using, e.g., a French or German keyboard, because in this case Tk fails to recognize the <code>Control-backslash</code> key sequence (for which one has to press <code>Control</code>, <code>AltGr</code>, and a third key: <code>_</code> on a French and <code>ß</code> |
︙ | ︙ | |||
12744 12745 12746 12747 12748 12749 12750 | location cursor is in an editable cell, then the interactive editing of the active element can also be started by pressing <code>Return</code> or <code>KP_Enter</code>.</dd> <dd class="tm">The affected components of the temporary embedded widget depend on the edit window: the widget itself in case of a Tk or tile checkbutton or menubutton; the edit window's entry children in case of a | > | | 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 | location cursor is in an editable cell, then the interactive editing of the active element can also be started by pressing <code>Return</code> or <code>KP_Enter</code>.</dd> <dd class="tm">The affected components of the temporary embedded widget depend on the edit window: the widget itself in case of a Tk or tile checkbutton or menubutton; the edit window's entry children in case of a mentry widget; the ttk::scale widget contained in a toggleswitch used as edit window; the only entry or entry-like component of the edit window in all other cases (see also the <code><b><a href= "#entrypath">entrypath</a></b></code> subcommand). The list of binding tags of these edit window components contains two addditional tags, inserted just before their path names: the binding tag whose name is returned by the <code><b><a href="#editwintag">editwintag</a></b></code> subcommand, followed by the tag <code><b>TablelistEdit</b></code>. The bindings described below are associated with the tag |
︙ | ︙ | |||
12854 12855 12856 12857 12858 12859 12860 | text or ctext widget then its content is left unselected. The key sequence <code>Meta-Left</code>/<code>Meta-Right</code> has the same effect as <code>Alt-Left</code>/<code>Alt-Right</code>. If <code><b>tk_strictMotif</b></code> is false and the edit window is not a text or ctext widget then <code>Meta-b</code> and <code>Meta-f</code> behave the same as <code>Alt-Left</code> and <code>Alt-Right</code>, respectively. If the edit window is a Tk or tile checkbutton or | > | | | | | | | 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 | text or ctext widget then its content is left unselected. The key sequence <code>Meta-Left</code>/<code>Meta-Right</code> has the same effect as <code>Alt-Left</code>/<code>Alt-Right</code>. If <code><b>tk_strictMotif</b></code> is false and the edit window is not a text or ctext widget then <code>Meta-b</code> and <code>Meta-f</code> behave the same as <code>Alt-Left</code> and <code>Alt-Right</code>, respectively. If the edit window is a Tk or tile checkbutton or menubutton, or a toggleswitch widget, then <code>Left</code>/<code>Right</code> has the same effect as <code>Alt-Left</code>/<code>Alt-Right</code>.</li> <li class="tm">When editing a cell that is not the first/last editable cell within its column, <code>Alt-Up</code>/<code>Alt-Down</code> (<code>Command-Up</code>/<code>Command-Down</code> on Mac OS X/11+ Aqua) terminates the editing in the current cell, moves the edit window one line up/down within the column, selects the content of the edit window's first entry or entry-like component (if any), and sets the insertion cursor to its end. If the new edit window is a text or ctext widget then its content is left unselected. The key sequence <code>Meta-Up</code>/<code>Meta-Down</code> has the same effect as <code>Alt-Up</code>/<code>Alt-Down</code>. If <code><b>tk_strictMotif</b></code> is false and the edit window is not a text or ctext widget or an Iwidgets combobox, then <code>Control-p</code> and <code>Control-n</code> behave the same as <code>Alt-Up</code> and <code>Alt-Down</code>, respectively. If the edit window is a Tk or tile entry, Tk or tile checkbutton, Tk or tile menubutton, toggleswitch, BWidget Entry, Iwidgets entryfield/spinner/spinint, or a mentry widget of type <code>"FixedPoint"</code>, then <code>Up</code>/<code>Down</code> has the same effect as <code>Alt-Up</code>/<code>Alt-Down</code>.</li> <li class="tm">When editing a cell that is not the first/last editable cell within its column, <code>Alt-Prior</code>/<code>Alt-Next</code> (<code>Command-Prior</code>/<code>Command-Next</code> on Mac OS X/11+ Aqua) terminates the editing in the current cell, moves the edit window up/down by one page within the column, selects the content of the edit window's first entry or entry-like component (if any), and sets the |
︙ | ︙ |
Added modules/tablelist/doc/tileWidgets2.png.
cannot compute difference between binary files
Changes to modules/tablelist/pkgIndex.tcl.
1 2 3 | #============================================================================== # Tablelist and Tablelist_tile package index file. # | | | | | | | | | | 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 | #============================================================================== # Tablelist and Tablelist_tile package index file. # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Regular packages: # package ifneeded tablelist 7.5 \ [list source [file join $dir tablelist.tcl]] package ifneeded tablelist_tile 7.5 \ [list source [file join $dir tablelist_tile.tcl]] # # Aliases: # package ifneeded Tablelist 7.5 \ [list package require -exact tablelist 7.5] package ifneeded Tablelist_tile 7.5 \ [list package require -exact tablelist_tile 7.5] # # Code common to all packages: # package ifneeded tablelist::common 7.5 \ [list source [file join $dir tablelistCommon.tcl]] |
Changes to modules/tablelist/scripts/tablelistBind.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 | #============================================================================== # Contains public and private procedures used in tablelist bindings. # # Structure of the module: # - Public helper procedures # - Binding tag Tablelist # - Binding tag TablelistMain # - Binding tag TablelistWindow # - Binding tag TablelistBody # - Binding tag TablelistHeader # - Binding tags TablelistLabel, TablelistSubLabel, and TablelistArrow # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #============================================================================== # Contains public and private procedures used in tablelist bindings. # # Structure of the module: # - Public helper procedures # - Binding tag Tablelist # - Binding tag TablelistMain # - Binding tag TablelistWindow # - Binding tag TablelistBody # - Binding tag TablelistHeader # - Binding tags TablelistLabel, TablelistSubLabel, and TablelistArrow # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Public helper procedures # ======================== # |
︙ | ︙ | |||
347 348 349 350 351 352 353 | } # # If there is a list variable associated with the # widget then remove the trace set on this variable # if {$data(hasListVar) && | < | | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | } # # If there is a list variable associated with the # widget then remove the trace set on this variable # if {$data(hasListVar) && [catch {upvar #0 $data(-listvariable) var}] == 0} { trace remove variable var {write unset} $data(listVarTraceCmd) } # # Destroy any existing bindings for the tags data(bodyTag), # data(headerTag), data(labelTag), and data(editwinTag) # |
︙ | ︙ | |||
2452 2453 2454 2455 2456 2457 2458 | #------------------------------------------------------------------------------ # tablelist::condEvalInvokeCmd # # This procedure is invoked when mouse button 1 is released in the body of a # tablelist widget win or in one of its separators. If interactive cell # editing is in progress in a column whose associated edit window has an invoke | | | 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 | #------------------------------------------------------------------------------ # tablelist::condEvalInvokeCmd # # This procedure is invoked when mouse button 1 is released in the body of a # tablelist widget win or in one of its separators. If interactive cell # editing is in progress in a column whose associated edit window has an invoke # command that hasn't yet been called in the current editing session, then the # procedure evaluates that command. #------------------------------------------------------------------------------ proc tablelist::condEvalInvokeCmd win { # # This is an "after 100" callback; check whether the window exists # if {[destroyed $win]} { |
︙ | ︙ | |||
2484 2485 2486 2487 2488 2489 2490 | # variable priv if {$priv(clickedInEditWin) && $priv(releasedInEditWin)} { return "" } # | < | > | < < < < > > > > > > > | | | | 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 | # variable priv if {$priv(clickedInEditWin) && $priv(releasedInEditWin)} { return "" } # # Return if the edit window is an editable combobox widget # set w $data(bodyFrmEd) set isCheckbtn 0 set isTogglesw 0 switch [winfo class $w] { TCombobox { if {[$w cget -state] eq "normal"} { return "" } } ComboBox - Combobox { if {[$w cget -editable]} { return "" } } Checkbutton - TCheckbutton { set isCheckbtn 1 } Toggleswitch { set isTogglesw 1 } } # # Evaluate the edit window's invoke command # eval [string map {"%W" "$w"} $editWin($name-invokeCmd)] set data(invoked) 1 # # If the edit window is a checkbutton or toggleswitch and the value # of the -instanttoggle option is true then finish the editing # if {($isCheckbtn || $isTogglesw) && $data(-instanttoggle)} { doFinishEditing $win } } #------------------------------------------------------------------------------ # tablelist::cancelMove # |
︙ | ︙ |
Changes to modules/tablelist/scripts/tablelistConfig.tcl.
1 2 3 | #============================================================================== # Contains private configuration procedures for tablelist widgets. # | | | 1 2 3 4 5 6 7 8 9 10 11 | #============================================================================== # Contains private configuration procedures for tablelist widgets. # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== #------------------------------------------------------------------------------ # tablelist::extendConfigSpecs # # Extends the elements of the array configSpecs. #------------------------------------------------------------------------------ |
︙ | ︙ | |||
223 224 225 226 227 228 229 | if {$::tcl_platform(osVersion) < 5.1} { ;# Win native set arrowColor {} set arrowDisabledColor {} set arrowStyle sunken8x7 set treeStyle winnative } elseif {$::tcl_platform(osVersion) == 5.1} { ;# Win XP | | | | | | | | | | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | if {$::tcl_platform(osVersion) < 5.1} { ;# Win native set arrowColor {} set arrowDisabledColor {} set arrowStyle sunken8x7 set treeStyle winnative } elseif {$::tcl_platform(osVersion) == 5.1} { ;# Win XP switch [mwutil::normalizeColor SystemHighlight] { #316ac5 { ;# Win XP Blue set arrowColor #aca899 set arrowStyle flat9x5 set treeStyle winxpBlue } #93a070 { ;# Win XP Olive set arrowColor #aca899 set arrowStyle flat9x5 set treeStyle winxpOlive } #b2b4bf { ;# Win XP Silver set arrowColor #aca899 set arrowStyle flat9x5 set treeStyle winxpSilver } default { ;# Win Classic set arrowColor SystemButtonShadow set arrowStyle flat7x4 set treeStyle winnative } } set arrowDisabledColor SystemDisabledText } elseif {$::tcl_platform(osVersion) == 6.0} { ;# Win Vista switch [mwutil::normalizeColor SystemHighlight] { #3399ff { ;# Vista Aero set arrowColor #569bc0 set arrowStyle photo[defaultWinArrowSize] set treeStyle vistaAero } default { ;# Win Classic set arrowColor SystemButtonShadow set arrowStyle flat[defaultWinArrowSize] set treeStyle vistaClassic } } set arrowDisabledColor SystemDisabledText } elseif {$::tcl_platform(osVersion) < 10.0} { ;# Win 7/8 switch [mwutil::normalizeColor SystemHighlight] { #3399ff" { ;# Win 7/8 Aero set arrowColor #569bc0 set arrowStyle photo[defaultWinArrowSize] set treeStyle win7Aero } default { ;# Win Classic set arrowColor SystemButtonShadow set arrowStyle flat[defaultWinArrowSize] |
︙ | ︙ | |||
347 348 349 350 351 352 353 | lappend configSpecs(-movecursor) $moveCursor lappend configSpecs(-resizecursor) $resizeCursor variable centerArrows 0 if {$winSys eq "win32" && ($::tcl_platform(osVersion) >= 10.0 || ($::tcl_platform(osVersion) >= 6.0 && | | | | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | lappend configSpecs(-movecursor) $moveCursor lappend configSpecs(-resizecursor) $resizeCursor variable centerArrows 0 if {$winSys eq "win32" && ($::tcl_platform(osVersion) >= 10.0 || ($::tcl_platform(osVersion) >= 6.0 && [mwutil::normalizeColor SystemHighlight] eq \ "#3399ff"))} { ;# Win 10 or 7/8 Aero set centerArrows 1 } } #------------------------------------------------------------------------------ # tablelist::doConfig # |
︙ | ︙ | |||
2824 2825 2826 2827 2828 2829 2830 | set textIdx1 [$w search -elide "\t" $textIdx1 $line.end]+2$pu incr col } # # Replace the row's content in the list variable if present # | | < | 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 | set textIdx1 [$w search -elide "\t" $textIdx1 $line.end]+2$pu incr col } # # Replace the row's content in the list variable if present # if {$inBody && $data(hasListVar)} { upvar #0 $data(-listvariable) var trace remove variable var {write unset} $data(listVarTraceCmd) set var [lreplace $var $row $row $newItem] trace add variable var {write unset} $data(listVarTraceCmd) } # |
︙ | ︙ | |||
3685 3686 3687 3688 3689 3690 3691 | set newItem [lreplace $oldItem $col $col $val] set data(${p}itemList) \ [lreplace $data(${p}itemList) $row $row $newItem] # # Replace the cell's content in the list variable if present # | | < | 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 | set newItem [lreplace $oldItem $col $col $val] set data(${p}itemList) \ [lreplace $data(${p}itemList) $row $row $newItem] # # Replace the cell's content in the list variable if present # if {$inBody && $data(hasListVar)} { upvar #0 $data(-listvariable) var trace remove variable var {write unset} $data(listVarTraceCmd) set var [lreplace $var $row $row \ [lrange $newItem 0 $data(lastCol)]] trace add variable var {write unset} $data(listVarTraceCmd) } |
︙ | ︙ | |||
4075 4076 4077 4078 4079 4080 4081 | upvar ::tablelist::ns${win}::data data if {$varName eq ""} { # # If there is an old list variable associated with the # widget then remove the trace set on this variable # if {$data(hasListVar) && | | < | 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 | upvar ::tablelist::ns${win}::data data if {$varName eq ""} { # # If there is an old list variable associated with the # widget then remove the trace set on this variable # if {$data(hasListVar) && [catch {upvar #0 $data(-listvariable) oldVar}] == 0} { synchronize $win trace remove variable oldVar {write unset} $data(listVarTraceCmd) } return "" } # # The list variable may be an array element but must not be an array |
︙ | ︙ | |||
4111 4112 4113 4114 4115 4116 4117 | } # # If there is an old list variable associated with the # widget then remove the trace set on this variable # if {$data(hasListVar) && | | < | | 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 | } # # If there is an old list variable associated with the # widget then remove the trace set on this variable # if {$data(hasListVar) && [catch {upvar #0 $data(-listvariable) oldVar}] == 0} { synchronize $win trace remove variable oldVar {write unset} $data(listVarTraceCmd) } if {[info exists var]} { # # Invoke the trace procedure associated with the new list variable # listVarTrace $win $name1 $name2 write } else { # # Set $varName according to the value of data(itemList) # set var {} foreach item $data(itemList) { lappend var [lrange $item 0 $data(lastCol)] |
︙ | ︙ |
Changes to modules/tablelist/scripts/tablelistEdit.tcl.
1 2 3 4 5 6 7 8 9 | #============================================================================== # Contains the implementation of interactive cell editing in tablelist widgets. # # Structure of the module: # - Namespace initialization # - Public procedures related to interactive cell editing # - Private procedures implementing the interactive cell editing # - Private procedures used in bindings related to interactive cell editing # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #============================================================================== # Contains the implementation of interactive cell editing in tablelist widgets. # # Structure of the module: # - Namespace initialization # - Public procedures related to interactive cell editing # - Private procedures implementing the interactive cell editing # - Private procedures used in bindings related to interactive cell editing # # Copyright (c) 2003-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Namespace initialization # ======================== # |
︙ | ︙ | |||
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 | $name-focusWin "" \ $name-reservedKeys {Left Right Up Down Prior Next} \ ] return $name } # # Private procedures implementing the interactive cell editing # ============================================================ # #------------------------------------------------------------------------------ # tablelist::checkEditWinName | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 | $name-focusWin "" \ $name-reservedKeys {Left Right Up Down Prior Next} \ ] return $name } #------------------------------------------------------------------------------ # tablelist::addToggleswitch # # Registers the toggleswitch widget from the Tsw package for interactive cell # editing. #------------------------------------------------------------------------------ proc tablelist::addToggleswitch {{name toggleswitch}} { checkEditWinName $name variable editWin array set editWin [list \ $name-creationCmd "createToggleswitch %W" \ $name-putValueCmd "%W switchstate %T" \ $name-getValueCmd "%W switchstate" \ $name-putTextCmd "" \ $name-getTextCmd "%W switchstate" \ $name-putListCmd "" \ $name-getListCmd "" \ $name-selectCmd "" \ $name-invokeCmd {%W instate !pressed {%W toggle}} \ $name-fontOpt "" \ $name-useFormat 0 \ $name-useReqWidth 1 \ $name-usePadX 0 \ $name-isEntryLike 0 \ $name-focusWin %W.scl \ $name-reservedKeys {} \ ] return $name } # # Private procedures implementing the interactive cell editing # ============================================================ # #------------------------------------------------------------------------------ # tablelist::checkEditWinName |
︙ | ︙ | |||
1230 1231 1232 1233 1234 1235 1236 | } tileqt { set padding 3 } xpnative { | | | | | | | | 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 | } tileqt { set padding 3 } xpnative { switch [mwutil::normalizeColor SystemHighlight] { #316ac5 - #93a070 - #b2b4bf - #3399ff { set padding 2 } default { set padding 1 } } } default { set padding 1 } } |
︙ | ︙ | |||
1282 1283 1284 1285 1286 1287 1288 | } tileqt { set padding 3 } vista { | | | | | | | | | | | 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 | } tileqt { set padding 3 } vista { switch [mwutil::normalizeColor SystemHighlight] { #3399ff { set padding 0 } default { set padding 1 } } } xpnative { switch [mwutil::normalizeColor SystemHighlight] { #316ac5 - #93a070 - #b2b4bf - #3399ff { set padding 2 } default { set padding 1 } } } default { set padding 1 } } |
︙ | ︙ | |||
1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 | # button will remain visible when shrinking the combobox. # This patch is needed for combobox versions earlier than 2.3. # pack forget $w.entry $w.button pack $w.button -side right -fill y -expand 0 pack $w.entry -side left -fill both -expand 1 } #------------------------------------------------------------------------------ # tablelist::doEditCell # # Processes the tablelist editcell subcommand. cmd may be an empty string, # "condChangeSelection", or "changeSelection". charPos stands for the # character position component of the index in the body text widget of the | > > > > > > > > > > > > > > > > > > | 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 | # button will remain visible when shrinking the combobox. # This patch is needed for combobox versions earlier than 2.3. # pack forget $w.entry $w.button pack $w.button -side right -fill y -expand 0 pack $w.entry -side left -fill both -expand 1 } #------------------------------------------------------------------------------ # tablelist::createToggleswitch # # Creates a toggleswitch widget of the given path name for interactive cell # editing in a tablelist widget. #------------------------------------------------------------------------------ proc tablelist::createToggleswitch {w args} { package require tsw tsw::toggleswitch $w -size 1 set frm [winfo parent $w] set width [winfo reqwidth $w.scl] set height [winfo reqheight $w.scl] $frm configure -width $width -height $height place $w -x 0 } #------------------------------------------------------------------------------ # tablelist::doEditCell # # Processes the tablelist editcell subcommand. cmd may be an empty string, # "condChangeSelection", or "changeSelection". charPos stands for the # character position component of the index in the body text widget of the |
︙ | ︙ | |||
1592 1593 1594 1595 1596 1597 1598 | return -code error $result } catch {$w configure -highlightthickness 0} clearTakefocusOpt $w set class [winfo class $w] set isCheckbtn [string match "*Checkbutton" $class] set isMenubtn [string match "*Menubutton" $class] | > | | | 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 | return -code error $result } catch {$w configure -highlightthickness 0} clearTakefocusOpt $w set class [winfo class $w] set isCheckbtn [string match "*Checkbutton" $class] set isMenubtn [string match "*Menubutton" $class] set isTogglesw [expr {$class eq "Toggleswitch"}] set isText [expr {$class eq "Text" || $class eq "Ctext"}] set isMentry [expr {$class eq "Mentry"}] if {!$isCheckbtn && !$isMenubtn && !$isTogglesw} { catch {$w configure -relief ridge} catch {$w configure -borderwidth 2} } if {$isText && $data($col-wrap) && $::tk_version >= 8.5} { $w configure -wrap word } set alignment [lindex $data(colList) [expr {2*$col + 1}]] |
︙ | ︙ | |||
1650 1651 1652 1653 1654 1655 1656 | variable pu if {$indentWidth == 0} { set textIdx [$b index $tabIdx1+1$pu] } else { $b mark set editIndentMark [$b index $tabIdx1+1$pu] set textIdx [$b index $tabIdx1+2$pu] } | | | 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 | variable pu if {$indentWidth == 0} { set textIdx [$b index $tabIdx1+1$pu] } else { $b mark set editIndentMark [$b index $tabIdx1+1$pu] set textIdx [$b index $tabIdx1+2$pu] } if {$isCheckbtn || $isTogglesw} { set editIdx $textIdx $b delete $editIdx $tabIdx2 } else { getAuxData $win $data(editKey) $data(editCol) auxType auxWidth if {$auxType == 0 || $auxType > 1} { ;# no image set editIdx $textIdx $b delete $editIdx $tabIdx2 |
︙ | ︙ | |||
1868 1869 1870 1871 1872 1873 1874 | } } } if {[info exists ::wcb::version]} { wcb::cbappend $w after insert tablelist::adjustTextHeight wcb::cbappend $w after delete tablelist::adjustTextHeight } | | | | 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 | } } } if {[info exists ::wcb::version]} { wcb::cbappend $w after insert tablelist::adjustTextHeight wcb::cbappend $w after delete tablelist::adjustTextHeight } } elseif {!$isCheckbtn && !$isTogglesw} { update idletasks if {[destroyed $win]} { return "" } $f configure -height [winfo reqheight $w] } # # Adjust the frame's width and paddings # if {!$isCheckbtn && !$isTogglesw} { place $w -relwidth 1.0 -relheight 1.0 adjustEditWindow $win $pixels update idletasks if {[destroyed $win]} { return "" } } |
︙ | ︙ | |||
1990 1991 1992 1993 1994 1995 1996 | [uplevel #0 $data(-editendcommand) [list $win $row $col $text]] if {[destroyed $win]} { return 0 } } if {!$data(rejected) && !$data($col-allowduplicates) && | | > | 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 | [uplevel #0 $data(-editendcommand) [list $win $row $col $text]] if {[destroyed $win]} { return 0 } } if {!$data(rejected) && !$data($col-allowduplicates) && [set i [lsearch -exact [getcolumnsSubCmd $win $col] $text]] >= 0 && $i != $row} { bell set data(rejected) 1 if {$data(-editendcommand) ne ""} { # # Pass the edit window's original content to the # command specified by the -editendcommand option |
︙ | ︙ |
Changes to modules/tablelist/scripts/tablelistMove.tcl.
1 2 3 | #============================================================================== # Contains the implementation of the tablelist move and movecolumn subcommands. # | | | 1 2 3 4 5 6 7 8 9 10 11 | #============================================================================== # Contains the implementation of the tablelist move and movecolumn subcommands. # # Copyright (c) 2003-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== #------------------------------------------------------------------------------ # tablelist::moveRow # # Processes the 1st form of the tablelist move subcommand. #------------------------------------------------------------------------------ |
︙ | ︙ | |||
285 286 287 288 289 290 291 | doCellConfig $target1 $treeCol $win -indent $base$depth } } # # Update the list variable if present # | | < | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | doCellConfig $target1 $treeCol $win -indent $base$depth } } # # Update the list variable if present # if {$data(hasListVar)} { upvar #0 $data(-listvariable) var trace remove variable var {write unset} $data(listVarTraceCmd) set var [lreplace $var $source $source] set pureSourceItem [lrange $sourceItem 0 $data(lastCol)] if {$target == $data(itemCount)} { lappend var $pureSourceItem ;# this works much faster } else { |
︙ | ︙ |
Changes to modules/tablelist/scripts/tablelistThemes.tcl.
1 2 3 4 5 6 7 8 9 | #============================================================================== # Contains procedures that populate the array themeDefaults with theme-specific # default values of some tablelist configuration options. # # Structure of the module: # - Public procedure related to tile themes # - Private procedures related to tile themes # - Private procedures related to global KDE configuration options # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #============================================================================== # Contains procedures that populate the array themeDefaults with theme-specific # default values of some tablelist configuration options. # # Structure of the module: # - Public procedure related to tile themes # - Private procedures related to tile themes # - Private procedures related to global KDE configuration options # # Copyright (c) 2005-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Public procedure related to tile themes # ======================================= # |
︙ | ︙ | |||
259 260 261 262 263 264 265 | set labelBg #efefef set labeldeactivatedBg #efefef set labeldisabledBg #efefef set labelpressedBg #dddddd set arrowColor #777777 } | | < | | | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | set labelBg #efefef set labeldeactivatedBg #efefef set labeldisabledBg #efefef set labelpressedBg #dddddd set arrowColor #777777 } switch [mwutil::normalizeColor systemMenuActive] { #3571cd - #7eadd9 { ;# Blue Cocoa/Carbon if {$majorOSVersion >= 14} { ;# OS X 10.10 or later if {$newAquaSupport} { if {$darkMode} { set stripeBg #282828 set labelselectedBg #323232 set labelselectedpressedBg #323232 } else { set stripeBg #f5f5f5 set labelselectedBg #eeeeee set labelselectedpressedBg #eeeeee } |
︙ | ︙ | |||
289 290 291 292 293 294 295 | } else { set stripeBg #edf3fe set labelselectedBg #80b8ef set labelselectedpressedBg #69aaeb } } | < | | | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | } else { set stripeBg #edf3fe set labelselectedBg #80b8ef set labelselectedpressedBg #69aaeb } } #5f6b7a - #9babbd { ;# Graphite Cocoa/Carbon if {$majorOSVersion >= 14} { ;# OS X 10.10 or later if {$newAquaSupport} { if {$darkMode} { set stripeBg #282828 set labelselectedBg #323232 set labelselectedpressedBg #323232 } else { set stripeBg #f5f5f5 set labelselectedBg #eeeeee set labelselectedpressedBg #eeeeee } |
︙ | ︙ | |||
326 327 328 329 330 331 332 | # # Get the default value of the -selectbackground option # if {$majorOSVersion >= 18} { ;# OS X 10.14 or later if {$newAquaSupport} { variable channel if {[info exists channel]} { ;# see proc condOpenPipeline | | > > > > > | > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | # # Get the default value of the -selectbackground option # if {$majorOSVersion >= 18} { ;# OS X 10.14 or later if {$newAquaSupport} { variable channel if {[info exists channel]} { ;# see proc condOpenPipeline set input [gets $channel] puts $channel "exit" flush $channel close $channel unset channel lassign $input r g b set rgb [format "#%02x%02x%02x" \ [expr {$r >> 8}] [expr {$g >> 8}] [expr {$b >> 8}]] } else { set rgb [mwutil::normalizeColor \ systemSelectedTextBackgroundColor] } if {[catch {winfo rgb . systemSelectedContentBackgroundColor}] == 0} { set selectBg systemSelectedContentBackgroundColor } elseif {$darkMode} { switch $rgb { #3f638b { set selectBg #0059d1 ;# blue } #705771 - #705670 { set selectBg #803482 ;# purple } #89576e - #88566e { set selectBg #c93379 ;# pink } #8b5759 - #8b5758 { set selectBg #d13539 ;# red } #896647 - #886547 { set selectBg #c96003 ;# orange } #8b7a3f - #8a754a { set selectBg #d19e00 ;# yellow } #5c7654 - #5c7653 { set selectBg #43932a ;# green } #ffffff { set selectBg #696969 ;# graphite } default { set selectBg systemHighlightAlternate } } } else { switch $rgb { #b3d7ff { set selectBg #0064e1 ;# blue } #dfc5e0 - #dfc5df { set selectBg #7d2a7e ;# purple } #fdcbe2 - #fccae2 { set selectBg #d93b86 ;# pink } #f6c4c5 - #f5c3c5 { set selectBg #c4262b ;# red } #fddabb - #fcd9bb { set selectBg #d96b0a ;# orange } #ffeebe - #fee9be { set selectBg #e1ac15 ;# yellow } #d0eac8 - #d0eac7 { set selectBg #4da033 ;# green } #e0e0e0 { set selectBg #808080 ;# graphite } default { set selectBg systemHighlightAlternate } } } } else { switch [mwutil::normalizeColor systemHighlight] { #b2d7ff { set selectBg #0064e1 ;# blue } #f7d4ff { set selectBg #7d2a7e ;# purple } #ffbfd2 { set selectBg #d93b86 ;# pink } #ffbbb8 { set selectBg #c4262b ;# red } #ffdfb3 { set selectBg #d96b0a ;# orange } #ffefb0 { set selectBg #e1ac15 ;# yellow } #c0f6ad { set selectBg #4da033 ;# green } #d8d8dc { set selectBg #808080 ;# graphite } default { set selectBg systemHighlightAlternate } } } } else { set selectBg systemHighlightAlternate } variable themeDefaults |
︙ | ︙ | |||
1823 1824 1825 1826 1827 1828 1829 | set pressedBg #bcdcf4 set labelBd 4 set labelPadY 4 set arrowColor #595959 set arrowStyle flatAngle[defaultWinArrowSize] set treeStyle win10 | | | | 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 | set pressedBg #bcdcf4 set labelBd 4 set labelPadY 4 set arrowColor #595959 set arrowStyle flatAngle[defaultWinArrowSize] set treeStyle win10 } elseif {[mwutil::normalizeColor SystemHighlight] eq "#3399ff"} { ;# Aero set selectFg SystemWindowText set labelBd 4 set labelPadY 4 if {$::tcl_platform(osVersion) < 6.2} { ;# Win Vista/7 set labelBg #ffffff set activeBg #e3f7ff |
︙ | ︙ | |||
1976 1977 1978 1979 1980 1981 1982 | set labelBd 4 set labelPadY 4 set arrowColor #595959 set arrowStyle flatAngle[defaultWinArrowSize] set treeStyle win10 } else { | | | | | | | 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 | set labelBd 4 set labelPadY 4 set arrowColor #595959 set arrowStyle flatAngle[defaultWinArrowSize] set treeStyle win10 } else { switch [mwutil::normalizeColor SystemHighlight] { #316ac5 { ;# Win XP Blue set xpStyle 1 set selectBg SystemHighlight set selectFg SystemHighlightText set labelBg #ebeadb set activeBg #faf8f3 set pressedBg #dedfd8 set labelBd 4 set labelPadY 4 set arrowColor #aca899 set arrowStyle flat9x5 set treeStyle winxpBlue if {[info exists ::tile::version] && [string compare $::tile::version "0.7"] < 0} { set labelBd 0 } } #93a070 { ;# Win XP Olive set xpStyle 1 set selectBg SystemHighlight set selectFg SystemHighlightText set labelBg #ebeadb set activeBg #faf8f3 set pressedBg #dedfd8 set labelBd 4 set labelPadY 4 set arrowColor #aca899 set arrowStyle flat9x5 set treeStyle winxpOlive if {[info exists ::tile::version] && [string compare $::tile::version "0.7"] < 0} { set labelBd 0 } } #b2b4bf { ;# Win XP Silver set xpStyle 1 set selectBg SystemHighlight set selectFg SystemHighlightText set labelBg #f9fafd set activeBg #fefefe set pressedBg #ececf3 set labelBd 4 set labelPadY 4 set arrowColor #aca899 set arrowStyle flat9x5 set treeStyle winxpSilver if {[info exists ::tile::version] && [string compare $::tile::version "0.7"] < 0} { set labelBd 0 } } #3399ff { ;# Aero set xpStyle 0 set selectFg SystemWindowText set labelBd 4 set labelPadY 4 if {$::tcl_platform(osVersion) < 6.2} { ;# Win Vista/7 set labelBg #ffffff |
︙ | ︙ |
Changes to modules/tablelist/scripts/tablelistUtil.tcl.
1 2 3 4 5 6 7 | #============================================================================== # Contains private utility procedures for tablelist widgets. # # Structure of the module: # - Namespace initialization # - Private utility procedures # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #============================================================================== # Contains private utility procedures for tablelist widgets. # # Structure of the module: # - Namespace initialization # - Private utility procedures # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Namespace initialization # ======================== # |
︙ | ︙ | |||
1045 1046 1047 1048 1049 1050 1051 | #------------------------------------------------------------------------------ # tablelist::condUpdateListVar # # Updates the list variable of the tablelist widget win if present. #------------------------------------------------------------------------------ proc tablelist::condUpdateListVar win { upvar ::tablelist::ns${win}::data data | | < | 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 | #------------------------------------------------------------------------------ # tablelist::condUpdateListVar # # Updates the list variable of the tablelist widget win if present. #------------------------------------------------------------------------------ proc tablelist::condUpdateListVar win { upvar ::tablelist::ns${win}::data data if {$data(hasListVar)} { upvar #0 $data(-listvariable) var trace remove variable var {write unset} $data(listVarTraceCmd) set var {} foreach item $data(itemList) { lappend var [lrange $item 0 $data(lastCol)] } trace add variable var {write unset} $data(listVarTraceCmd) |
︙ | ︙ | |||
6637 6638 6639 6640 6641 6642 6643 | lappend data(viewableRowList) $row } } } if {$offset >= [llength $data(viewableRowList)]} { return $data(itemCount) ;# this is out of range | < | | | | 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 | lappend data(viewableRowList) $row } } } if {$offset >= [llength $data(viewableRowList)]} { return $data(itemCount) ;# this is out of range } elseif {$offset < 0} { return 0 } else { return [lindex $data(viewableRowList) $offset] } } } #------------------------------------------------------------------------------ # tablelist::createCkbtn |
︙ | ︙ |
Changes to modules/tablelist/scripts/tablelistWidget.tcl.
1 2 3 4 5 6 7 8 9 10 | #============================================================================== # Contains the implementation of the tablelist widget. # # Structure of the module: # - Namespace initialization # - Private procedure creating the default bindings # - Public procedure creating a new tablelist widget # - Private procedures implementing the tablelist widget command # - Private callback procedures # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #============================================================================== # Contains the implementation of the tablelist widget. # # Structure of the module: # - Namespace initialization # - Private procedure creating the default bindings # - Public procedure creating a new tablelist widget # - Private procedures implementing the tablelist widget command # - Private callback procedures # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Namespace initialization # ======================== # |
︙ | ︙ | |||
2534 2535 2536 2537 2538 2539 2540 | proc tablelist::entrypathSubCmd {win argList} { if {[llength $argList] != 0} { mwutil::wrongNumArgs "$win entrypath" } upvar ::tablelist::ns${win}::data data if {[winfo exists $data(bodyFrmEd)]} { | > | < | 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 | proc tablelist::entrypathSubCmd {win argList} { if {[llength $argList] != 0} { mwutil::wrongNumArgs "$win entrypath" } upvar ::tablelist::ns${win}::data data if {[winfo exists $data(bodyFrmEd)]} { if {[regexp {^(Mentry|Toggleswitch|T?Checkbutton|T?Menubutton)$} \ [winfo class $data(bodyFrmEd)]]} { return "" } else { return $data(editFocus) } } else { return "" } |
︙ | ︙ | |||
7483 7484 7485 7486 7487 7488 7489 | set data(itemList) [lreplace $data(itemList) $first $last] set data(keyList) [lreplace $data(keyList) $first $last] incr data(itemCount) -$count # # Delete the given items from the list variable if needed # | | < | 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 | set data(itemList) [lreplace $data(itemList) $first $last] set data(keyList) [lreplace $data(keyList) $first $last] incr data(itemCount) -$count # # Delete the given items from the list variable if needed # if {$updateListVar} { upvar #0 $data(-listvariable) var trace remove variable var {write unset} $data(listVarTraceCmd) set var [lreplace $var $first $last] trace add variable var {write unset} $data(listVarTraceCmd) } # |
︙ | ︙ | |||
7810 7811 7812 7813 7814 7815 7816 | set childCount [llength $data($parentKey-childList)] if {$childIdx < 0} { set childIdx 0 } elseif {$childIdx > $childCount} { ;# e.g., if $childIdx is "end" set childIdx $childCount } | < < | 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 | set childCount [llength $data($parentKey-childList)] if {$childIdx < 0} { set childIdx 0 } elseif {$childIdx > $childCount} { ;# e.g., if $childIdx is "end" set childIdx $childCount } if {$updateListVar} { upvar #0 $data(-listvariable) var trace remove variable var {write unset} $data(listVarTraceCmd) } # # Insert the items into the internal list |
︙ | ︙ | |||
9348 9349 9350 9351 9352 9353 9354 | } } #------------------------------------------------------------------------------ # tablelist::listVarTrace # # This procedure is executed whenever the global variable specified by varName | | | | | 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 | } } #------------------------------------------------------------------------------ # tablelist::listVarTrace # # This procedure is executed whenever the global variable specified by varName # and arrIndex is written or unset. It makes sure that the content of the # widget will be synchronized with the value of the variable at idle time, and # that the variable is recreated if it was unset. #------------------------------------------------------------------------------ proc tablelist::listVarTrace {win varName arrIndex op} { upvar ::tablelist::ns${win}::data data switch $op { write { if {![info exists data(syncId)]} { # |
︙ | ︙ |
Changes to modules/tablelist/scripts/tclIndex.
︙ | ︙ | |||
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | set auto_index(::tablelist::addOakleyCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addDateMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addTimeMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addDateTimeMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addFixedPointMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addIPAddrMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addIPv6AddrMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::checkEditWinName) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createCheckbutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createMenubutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::postMenuCmd) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileEntry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileSpinbox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileCheckbutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileMenubutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createBWidgetSpinBox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createBWidgetComboBox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createIncrDateentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createIncrTimeentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createIncrCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createOakleyCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::doEditCell) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::doCancelEditing) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::doFinishEditing) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::clearTakefocusOpt) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::adjustTextHeight) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::setMentryCursor) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::configAutoFinishEditing) [list source [file join $dir tablelistEdit.tcl]] | > > | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | set auto_index(::tablelist::addOakleyCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addDateMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addTimeMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addDateTimeMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addFixedPointMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addIPAddrMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addIPv6AddrMentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::addToggleswitch) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::checkEditWinName) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createCheckbutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createMenubutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::postMenuCmd) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileEntry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileSpinbox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileCheckbutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createTileMenubutton) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createBWidgetSpinBox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createBWidgetComboBox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createIncrDateentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createIncrTimeentry) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createIncrCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createOakleyCombobox) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::createToggleswitch) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::doEditCell) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::doCancelEditing) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::doFinishEditing) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::clearTakefocusOpt) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::adjustTextHeight) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::setMentryCursor) [list source [file join $dir tablelistEdit.tcl]] set auto_index(::tablelist::configAutoFinishEditing) [list source [file join $dir tablelistEdit.tcl]] |
︙ | ︙ |
Changes to modules/tablelist/scripts/utils/mwutil.tcl.
1 2 3 4 5 6 7 | #============================================================================== # Contains utility procedures for mega-widgets. # # Structure of the module: # - Namespace initialization # - Public utility procedures # | | | | > | 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 | #============================================================================== # Contains utility procedures for mega-widgets. # # Structure of the module: # - Namespace initialization # - Public utility procedures # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== if {[catch {package require Tk 8.4-}]} { package require Tk 8.4 } # # Namespace initialization # ======================== # namespace eval mwutil { # # Public variables: # variable version 2.24 variable library [file dirname [file normalize [info script]]] # # Public procedures: # namespace export wrongNumArgs getAncestorByClass convEventFields \ defineKeyNav processTraversal focusNext focusPrev \ configureWidget fullConfigOpt fullOpt enumOpts \ configureSubCmd attribSubCmdEx attribSubCmd \ hasattribSubCmdEx hasattribSubCmd unsetattribSubCmdEx \ unsetattribSubCmd getScrollInfo getScrollInfo2 \ isScrollable scrollByUnits genMouseWheelEvent \ containsPointer hasFocus windowingSystem currentTheme \ normalizeColor parsePadding # # Make modified versions of the procedures tk_focusNext and |
︙ | ︙ | |||
142 143 144 145 146 147 148 | # descendant of a mega-widget of the specified class. #------------------------------------------------------------------------------ proc mwutil::defineKeyNav class { foreach event {<Tab> <Shift-Tab> <<PrevWindow>>} { bind ${class}KeyNav $event \ [list mwutil::processTraversal %W $class $event] } | < < < | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | # descendant of a mega-widget of the specified class. #------------------------------------------------------------------------------ proc mwutil::defineKeyNav class { foreach event {<Tab> <Shift-Tab> <<PrevWindow>>} { bind ${class}KeyNav $event \ [list mwutil::processTraversal %W $class $event] } } #------------------------------------------------------------------------------ # mwutil::processTraversal # # Processes the given traversal event for the mega-widget of the specified # class containing the widget w if that mega-widget is not the only widget |
︙ | ︙ | |||
345 346 347 348 349 350 351 352 353 354 355 356 357 358 | # Returns a string consisting of the elements of the given list, separated by # commas and spaces. #------------------------------------------------------------------------------ proc mwutil::enumOpts optList { set optCount [llength $optList] set n 1 foreach opt $optList { if {$n == 1} { set str $opt } elseif {$n < $optCount} { append str ", $opt" } else { if {$optCount > 2} { append str "," | > | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | # Returns a string consisting of the elements of the given list, separated by # commas and spaces. #------------------------------------------------------------------------------ proc mwutil::enumOpts optList { set optCount [llength $optList] set n 1 foreach opt $optList { set opt [list $opt] if {$n == 1} { set str $opt } elseif {$n < $optCount} { append str ", $opt" } else { if {$optCount > 2} { append str "," |
︙ | ︙ | |||
407 408 409 410 411 412 413 | } } return $result } } #------------------------------------------------------------------------------ | | | < | | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | } } return $result } } #------------------------------------------------------------------------------ # mwutil::attribSubCmdEx # # This procedure is invoked to process *attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::attribSubCmdEx {rootNs win prefix argList} { upvar ::${rootNs}::ns${win}::attribs attribs set argCount [llength $argList] if {$argCount > 1} { # # Set the specified attributes to the given values # if {$argCount % 2 != 0} { |
︙ | ︙ | |||
451 452 453 454 455 456 457 458 459 460 461 462 463 464 | foreach name [lsort [array names attribs "$prefix-*"]] { set attr [string range $name $len end] lappend result [list $attr $attribs($name)] } return $result } } #------------------------------------------------------------------------------ # mwutil::hasattribSubCmd # # This procedure is invoked to process has*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::hasattribSubCmd {win prefix attr} { | > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > | > | > > > > | < | < < < < < < | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | foreach name [lsort [array names attribs "$prefix-*"]] { set attr [string range $name $len end] lappend result [list $attr $attribs($name)] } return $result } } #------------------------------------------------------------------------------ # mwutil::attribSubCmd # # This procedure is invoked to process *attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::attribSubCmd {win prefix argList} { set rootNs [string tolower [winfo class $win]] return [attribSubCmdEx $rootNs $win $prefix $argList] } #------------------------------------------------------------------------------ # mwutil::hasattribSubCmdEx # # This procedure is invoked to process has*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::hasattribSubCmdEx {rootNs win prefix attr} { upvar ::${rootNs}::ns${win}::attribs attribs return [info exists attribs($prefix-$attr)] } #------------------------------------------------------------------------------ # mwutil::hasattribSubCmd # # This procedure is invoked to process has*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::hasattribSubCmd {win prefix attr} { set rootNs [string tolower [winfo class $win]] return [hasattribSubCmdEx $rootNs $win $prefix $attr] } #------------------------------------------------------------------------------ # mwutil::unsetattribSubCmdEx # # This procedure is invoked to process unset*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::unsetattribSubCmdEx {rootNs win prefix attr} { upvar ::${rootNs}::ns${win}::attribs attribs set name $prefix-$attr if {[info exists attribs($name)]} { unset attribs($name) } return "" } #------------------------------------------------------------------------------ # mwutil::unsetattribSubCmd # # This procedure is invoked to process unset*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::unsetattribSubCmd {win prefix attr} { set rootNs [string tolower [winfo class $win]] return [unsetattribSubCmdEx $rootNs $win $prefix $attr] } #------------------------------------------------------------------------------ # mwutil::getScrollInfo # # Parses a list of arguments of the form "moveto <fraction>" or "scroll # <number> units|pages" and returns the corresponding list consisting of two or |
︙ | ︙ |
Changes to modules/tablelist/scripts/utils/pkgIndex.tcl.
1 2 3 | #============================================================================== # mwutil, scaleutil, and scaleutilmisc package index file. # | | | | | | 1 2 3 4 5 6 7 8 9 10 11 | #============================================================================== # mwutil, scaleutil, and scaleutilmisc package index file. # # Copyright (c) 2020-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package ifneeded mwutil 2.24 [list source [file join $dir mwutil.tcl]] package ifneeded scaleutil 1.15 [list source [file join $dir scaleutil.tcl]] package ifneeded themepatch 1.8 [list source [file join $dir themepatch.tcl]] package ifneeded scaleutilmisc 1.7.1 \ [list source [file join $dir scaleutilMisc.tcl]] |
Changes to modules/tablelist/scripts/utils/scaleutil.tcl.
1 2 3 4 5 6 7 8 | #============================================================================== # Contains scaling-related utility procedures. # # Structure of the module: # - Namespace initialization # - Public utility procedures # - Private helper procedures # | | | | 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 | #============================================================================== # Contains scaling-related utility procedures. # # Structure of the module: # - Namespace initialization # - Public utility procedures # - Private helper procedures # # Copyright (c) 2020-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== if {[catch {package require Tk 8.4-}]} { package require Tk 8.4 } # # Namespace initialization # ======================== # namespace eval scaleutil { # # Public variables: # variable version 1.15 variable library [file dirname [file normalize [info script]]] # # Public procedures: # namespace export scalingPercentage scale |
︙ | ︙ | |||
460 461 462 463 464 465 466 | set l [scale 2 $pct]; set t $l; set r [scale 1 $pct] set margins [list $l $t $r 0] ;# {2 2 1 0} ttk::style configure TNotebook -tabmargins $margins ttk::style configure TNotebook.Tab \ -padding [list [scale 4 $pct] [scale 2 $pct]] ttk::style map TNotebook.Tab -expand [list selected $margins] | > > | > | | | 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | set l [scale 2 $pct]; set t $l; set r [scale 1 $pct] set margins [list $l $t $r 0] ;# {2 2 1 0} ttk::style configure TNotebook -tabmargins $margins ttk::style configure TNotebook.Tab \ -padding [list [scale 4 $pct] [scale 2 $pct]] ttk::style map TNotebook.Tab -expand [list selected $margins] ttk::style configure Sash -sashthickness [scale 5 $pct] \ -gripsize [scale 20 $pct] # # -diameter was replaced with -size in Tk 9. # set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l set indMargins [list $l $t $r $b] ;# {2 2 4 2} ttk::style configure Item -diameter [scale 9 $pct] \ -size [scale 9 $pct] -indicatormargins $indMargins ttk::style configure Treeview -indent [scale 20 $pct] } } #------------------------------------------------------------------------------ # scaleutil::scaleStyles_clam # # Scales a few styles for the "clam" theme. #------------------------------------------------------------------------------ proc scaleutil::scaleStyles_clam pct { ttk::style theme settings clam { # # -gripcount was replaced with -gripsize in Tk 9. # set gripCount [scale 5 $pct] set gripSize [scale 10 $pct] set scrlbarWidth [scale 14 $pct] ttk::style configure TScrollbar -gripcount $gripCount \ -gripsize $gripSize -arrowsize $scrlbarWidth -width $scrlbarWidth |
︙ | ︙ | |||
507 508 509 510 511 512 513 | ttk::style configure TButton -padding [scale 5 $pct] ttk::style configure Toolbutton -padding [scale 2 $pct] ttk::style configure TMenubutton -arrowsize [scale 5 $pct] \ -arrowpadding [scale 3 $pct] -padding [scale 5 $pct] # | | | | 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | ttk::style configure TButton -padding [scale 5 $pct] ttk::style configure Toolbutton -padding [scale 2 $pct] ttk::style configure TMenubutton -arrowsize [scale 5 $pct] \ -arrowpadding [scale 3 $pct] -padding [scale 5 $pct] # # The -indicatorsize option was removed in Tk 8.7b1/9. # set l [scale 1 $pct]; set t $l; set r [scale 4 $pct]; set b $l set indMargin [list $l $t $r $b] ;# {1 1 4 1} foreach style {TCheckbutton TRadiobutton} { ttk::style configure $style -indicatorsize [scale 10 $pct] \ -indicatormargin $indMargin -padding [scale 2 $pct] } set l [scale 6 $pct]; set t [scale 2 $pct]; set r $l; set b $t ttk::style configure TNotebook.Tab \ -padding [list $l $t $r $b] ;# {6 2 6 2} set t [scale 4 $pct] ttk::style map TNotebook.Tab \ -padding [list selected [list $l $t $r $b]] ;# {6 4 6 2} # # -gripcount was replaced with -gripsize in Tk 9. # ttk::style configure Sash -sashthickness [scale 6 $pct] \ -gripcount [scale 10 $pct] -gripsize [scale 20 $pct] ttk::style configure Heading -padding [scale 3 $pct] set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l set indMargins [list $l $t $r $b] ;# {2 2 4 2} |
︙ | ︙ | |||
579 580 581 582 583 584 585 | ttk::style configure TMenubutton \ -indicatormargin [list [scale 5 $pct] 0] -padding {3m 1m} set t [scale 2 $pct]; set r [scale 4 $pct]; set b $t set indMargin [list 0 $t $r $b] ;# {0 2 4 2} foreach style {TCheckbutton TRadiobutton} { # | | | 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | ttk::style configure TMenubutton \ -indicatormargin [list [scale 5 $pct] 0] -padding {3m 1m} set t [scale 2 $pct]; set r [scale 4 $pct]; set b $t set indMargin [list 0 $t $r $b] ;# {0 2 4 2} foreach style {TCheckbutton TRadiobutton} { # # -indicatordiameter was renamed to -indicatorsize in Tk 9. # ttk::style configure $style -indicatordiameter [scale 12 $pct] \ -indicatorsize [scale 12 $pct] -indicatormargin $indMargin } ttk::style configure TNotebook.Tab -padding {3m 1m} |
︙ | ︙ | |||
633 634 635 636 637 638 639 | ttk::style configure TSpinbox -arrowsize [scale 10 $pct] \ -padding [list $l 0 $r 0] ;# {2 0 10 0} ttk::style configure TButton -padding [scale 3 $pct] ttk::style configure Toolbutton -padding [scale 2 $pct] # | | | > > > | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 | ttk::style configure TSpinbox -arrowsize [scale 10 $pct] \ -padding [list $l 0 $r 0] ;# {2 0 10 0} ttk::style configure TButton -padding [scale 3 $pct] ttk::style configure Toolbutton -padding [scale 2 $pct] # # -indicatormargin was replaced with # -arrowsize and -arrowpadding in Tk 8.7b1/9. # ttk::style configure TMenubutton \ -indicatormargin [list [scale 5 $pct] 0] \ -arrowsize [scale 5 $pct] -arrowpadding [scale 3 $pct] \ -padding [list [scale 10 $pct] [scale 3 $pct]] set t [scale 2 $pct]; set r [scale 4 $pct]; set b $t set indMargin [list 0 $t $r $b] ;# {0 2 4 2} foreach style {TCheckbutton TRadiobutton} { # # -indicatordiameter was removed in Tk 8.7b1/9. # ttk::style configure $style -indicatordiameter [scale 10 $pct] \ -indicatormargin $indMargin -padding [scale 1 $pct] } ttk::style configure TNotebook.Tab \ -padding [list [scale 4 $pct] [scale 2 $pct]] ttk::style configure Sash -sashthickness [scale 5 $pct] \ -gripsize [scale 20 $pct] set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l set indMargins [list $l $t $r $b] ;# {2 2 4 2} ttk::style configure Item -indicatorsize [scale 12 $pct] \ -indicatormargins $indMargins ttk::style configure Treeview -indent [scale 20 $pct] } |
︙ | ︙ | |||
680 681 682 683 684 685 686 687 688 689 690 691 692 693 | ttk::style configure TMenubutton \ -padding [list [scale 8 $pct] [scale 4 $pct]] foreach style {TCheckbutton TRadiobutton} { ttk::style configure $style -padding [scale 2 $pct] } set padding [list [scale 4 $pct] 0 0 0] ;# {4 0 0 0} ttk::style configure Item -padding $padding ttk::style configure Treeview -indent [scale 20 $pct] } } | > > > | 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | ttk::style configure TMenubutton \ -padding [list [scale 8 $pct] [scale 4 $pct]] foreach style {TCheckbutton TRadiobutton} { ttk::style configure $style -padding [scale 2 $pct] } ttk::style configure Sash -sashthickness [scale 5 $pct] \ -gripsize [scale 20 $pct] set padding [list [scale 4 $pct] 0 0 0] ;# {4 0 0 0} ttk::style configure Item -padding $padding ttk::style configure Treeview -indent [scale 20 $pct] } } |
︙ | ︙ | |||
719 720 721 722 723 724 725 | foreach style {TCheckbutton TRadiobutton} { ttk::style configure $style -padding $padding } ttk::style configure TNotebook.Tab \ -padding [list [scale 3 $pct] [scale 1 $pct]] | > > | > | | 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | foreach style {TCheckbutton TRadiobutton} { ttk::style configure $style -padding $padding } ttk::style configure TNotebook.Tab \ -padding [list [scale 3 $pct] [scale 1 $pct]] ttk::style configure Sash -sashthickness [scale 5 $pct] \ -gripsize [scale 20 $pct] # # -diameter was replaced with -size in Tk 9. # set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l set indMargins [list $l $t $r $b] ;# {2 2 4 2} ttk::style configure Item -diameter [scale 9 $pct] \ -size [scale 9 $pct] -indicatormargins $indMargins ttk::style configure Treeview -indent [scale 20 $pct] } |
︙ | ︙ | |||
752 753 754 755 756 757 758 | ttk::style configure TMenubutton \ -padding [list [scale 8 $pct] [scale 4 $pct]] foreach style {TCheckbutton TRadiobutton} { ttk::style configure $style -padding [scale 2 $pct] } | > > | > | | 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | ttk::style configure TMenubutton \ -padding [list [scale 8 $pct] [scale 4 $pct]] foreach style {TCheckbutton TRadiobutton} { ttk::style configure $style -padding [scale 2 $pct] } ttk::style configure Sash -sashthickness [scale 5 $pct] \ -gripsize [scale 20 $pct] # # -diameter was replaced with -size in Tk 9. # set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l set indMargins [list $l $t $r $b] ;# {2 2 4 2} ttk::style configure Item -diameter [scale 9 $pct] \ -size [scale 9 $pct] -indicatormargins $indMargins ttk::style configure Treeview -indent [scale 20 $pct] } |
︙ | ︙ |
Changes to modules/tablelist/tablelist.tcl.
1 2 3 | #============================================================================== # Main Tablelist package module. # | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | #============================================================================== # Main Tablelist package module. # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require -exact tablelist::common 7.5 package provide tablelist $tablelist::version package provide Tablelist $tablelist::version tablelist::useTile 0 tablelist::createBindings |
Changes to modules/tablelist/tablelistCommon.tcl.
1 2 3 | #============================================================================== # Main Tablelist and Tablelist_tile package module. # | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #============================================================================== # Main Tablelist and Tablelist_tile package module. # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== namespace eval tablelist { proc - {} { return [expr {$::tcl_version >= 8.5 ? "-" : ""}] } package require Tk 8.4[-] # # Public variables: # variable version 7.5 variable library [file dirname [file normalize [info script]]] # # Creates a new tablelist widget: # namespace export tablelist |
︙ | ︙ | |||
38 39 40 41 42 43 44 | namespace export addIncrEntryfield addIncrDateTimeWidget \ addIncrSpinner addIncrSpinint addIncrCombobox namespace export addCtext addOakleyCombobox namespace export addDateMentry addTimeMentry addDateTimeMentry \ addFixedPointMentry addIPAddrMentry addIPv6AddrMentry } | | | | | | | | | | | | | | | | | | | | | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | namespace export addIncrEntryfield addIncrDateTimeWidget \ addIncrSpinner addIncrSpinint addIncrCombobox namespace export addCtext addOakleyCombobox namespace export addDateMentry addTimeMentry addDateTimeMentry \ addFixedPointMentry addIPAddrMentry addIPv6AddrMentry } package provide tablelist::common $tablelist::version # # The following procedure, invoked in "tablelist.tcl" and # "tablelist_tile.tcl", sets the variable tablelist::usingTile # to the given value and sets a trace on this variable. # proc tablelist::useTile {bool} { variable usingTile $bool trace add variable usingTile {write unset} \ [list tablelist::restoreUsingTile $bool] } # # The following trace procedure is executed whenever the variable # tablelist::usingTile is written or unset. It restores the # variable to its original value, given by the first argument. # proc tablelist::restoreUsingTile {origVal varName index op} { variable usingTile $origVal switch $op { write { return -code error "it is not supported to use both Tablelist and\ Tablelist_tile in the same application" } unset { trace add variable usingTile {write unset} \ [list tablelist::restoreUsingTile $origVal] } } } proc tablelist::createTkAliases {} { foreach cmd {frame label} { if {[llength [info commands ::tk::$cmd]] == 0} { interp alias {} tk::$cmd {} $cmd } } } tablelist::createTkAliases # # Everything else needed is lazily loaded on demand, via the dispatcher # set up in the subdirectory "scripts" (see the file "tclIndex"). # lappend auto_path [file join $tablelist::library scripts] # # Load the packages mwutil, scaleutil, and scaleutilmisc from the directory # "scripts/utils". Take into account that mwutil is also included in Mentry, # Scrollutil, and Tsw, and scaleutil is also included in Scrollutil and Tsw. # proc tablelist::loadUtils {} { if {[catch {package present mwutil} version] == 0 && [package vcompare $version 2.24] < 0} { package forget mwutil } package require mwutil 2.24[-] if {[catch {package present scaleutil} version] == 0 && [package vcompare $version 1.15] < 0} { package forget scaleutil } package require scaleutil 1.15[-] package require scaleutilmisc 1.7.1[-] } tablelist::loadUtils |
Changes to modules/tablelist/tablelist_tile.tcl.
1 2 3 | #============================================================================== # Main Tablelist_tile package module. # | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #============================================================================== # Main Tablelist_tile package module. # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require -exact tablelist::common 7.5 if {$::tk_version < 8.5 || [regexp {^8\.5a[1-5]$} $::tk_patchLevel]} { package require tile 0.6[tablelist::-] } package provide tablelist_tile $tablelist::version package provide Tablelist_tile $tablelist::version tablelist::useTile 1 tablelist::createBindings namespace eval tablelist { # # Commands related to tile themes: # namespace export getThemes getCurrentTheme setTheme setThemeDefaults } |