Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | * ../../examples/tablelist/*.tcl: Bumped the version number to 6.10; made all demo-scripts fully scaling-aware. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: | ff3ff82069120bf5868c5214363234dcdcdbaa1790452f9a9d9aad41f5ac8ffb |
User & Date: | csaba 2020-06-23 09:25:01 |
2020-06-23
| ||
09:32 | * ../../examples/tablelist/*.gif: Removed checked.gif, unchecked.gif, and open.gif; added (checked|unchecked|openAction)100.gif, (checked|unchecked|openAction)125.gif, ..., (checked|unchecked|openAction)200.gif. check-in: 6125334d6d user: csaba tags: trunk | |
09:25 | * ../../examples/tablelist/*.tcl: Bumped the version number to 6.10; made all demo-scripts fully scaling-aware. check-in: ff3ff82069 user: csaba tags: trunk | |
09:23 | * doc/browse.png: Updated screenshots. * doc/browseTree.png: * doc/bwidget.png: * doc/config.png: * doc/dirViewer.png: * doc/embeddedWindows.png: * doc/embeddedWindows_tile.png: * doc/plain200.png: * doc/styles.png: * doc/tileWidgets.png: check-in: 0d4946b2e4 user: csaba tags: trunk | |
Changes to examples/tablelist/browse.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
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying information about # the children of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.9 namespace eval demo { variable dir [file dirname [info script]] # # Create two images, needed in the procedure putChildren # variable leafImg [image create bitmap -file [file join $dir leaf.xbm] \ -background coral -foreground gray50] variable compImg [image create bitmap -file [file join $dir comp.xbm] \ -background yellow -foreground gray50] } source [file join $demo::dir config.tcl] #------------------------------------------------------------------------------ # demo::displayChildren # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl |
|
|
>
|
|
|
|
|
|
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
...
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying information about # the children of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.10 namespace eval demo { variable dir [file dirname [info script]] # # Create two images corresponding to the display's DPI scaling level # set pct $::tablelist::scalingpct variable compImg [image create bitmap -file [file join $dir comp$pct.xbm] \ -background yellow -foreground gray50] variable leafImg [image create bitmap -file [file join $dir leaf$pct.xbm] \ -background coral -foreground gray50] } source [file join $demo::dir config.tcl] #------------------------------------------------------------------------------ # demo::displayChildren # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl |
Changes to examples/tablelist/browseTree.tcl.
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 .. 73 74 75 76 77 78 79 80 81 82 83 84 85 86 ... 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# Demonstrates how to use a tablelist widget for displaying information about # the children of an arbitrary widget. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.3 package require tablelist 6.9 namespace eval demo { variable dir [file dirname [info script]] # # Create two images, needed in the procedure putChildren # variable leafImg [image create bitmap -file [file join $dir leaf.xbm] \ -background coral -foreground gray50] variable compImg [image create bitmap -file [file join $dir comp.xbm] \ -background yellow -foreground gray50] } source [file join $demo::dir config.tcl] #------------------------------------------------------------------------------ # demo::displayChildren # ................................................................................ $tbl columnconfigure $col -sortmode integer } foreach col {6 7} { $tbl columnconfigure $col -formatcommand demo::formatBoolean } scrollbar $vsb -orient vertical -command [list $tbl yview] # # When displaying the information about the children of any # ancestor of the label widgets, the widths of some of the # labels and thus also the widths and x coordinates of some # children may change. For this reason, make sure the items # will be updated after any change in the sizes of the labels # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl root |
| | > | | | | > > > > > > > > > | |
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 .. 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ... 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# Demonstrates how to use a tablelist widget for displaying information about # the children of an arbitrary widget. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.3 package require tablelist 6.10 namespace eval demo { variable dir [file dirname [info script]] # # Create two images corresponding to the display's DPI scaling level # set pct $::tablelist::scalingpct variable compImg [image create bitmap -file [file join $dir comp$pct.xbm] \ -background yellow -foreground gray50] variable leafImg [image create bitmap -file [file join $dir leaf$pct.xbm] \ -background coral -foreground gray50] } source [file join $demo::dir config.tcl] #------------------------------------------------------------------------------ # demo::displayChildren # ................................................................................ $tbl columnconfigure $col -sortmode integer } foreach col {6 7} { $tbl columnconfigure $col -formatcommand demo::formatBoolean } scrollbar $vsb -orient vertical -command [list $tbl yview] # # On X11 configure the tablelist according # to the display's DPI scaling level # variable winSys ;# see config.tcl if {[string compare $winSys "x11"] == 0} { $tbl configure -treestyle bicolor$::tablelist::scalingpct } # # When displaying the information about the children of any # ancestor of the label widgets, the widths of some of the # labels and thus also the widths and x coordinates of some # children may change. For this reason, make sure the items # will be updated after any change in the sizes of the labels # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl root |
Changes to examples/tablelist/browseTree_tile.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 .. 80 81 82 83 84 85 86 87 88 89 90 91 92 93 ... 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
#============================================================================== # Demonstrates how to use a tablelist widget for displaying information about # the children of an arbitrary widget. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 namespace eval demo { variable dir [file dirname [info script]] # # Create two images, needed in the procedure putChildren # variable leafImg [image create bitmap -file [file join $dir leaf.xbm] \ -background coral -foreground gray50] variable compImg [image create bitmap -file [file join $dir comp.xbm] \ -background yellow -foreground gray50] } source [file join $demo::dir config_tile.tcl] # # Work around the improper appearance of the tile scrollbars in the aqua theme # ................................................................................ $tbl columnconfigure $col -sortmode integer } foreach col {6 7} { $tbl columnconfigure $col -formatcommand demo::formatBoolean } ttk::scrollbar $vsb -orient vertical -command [list $tbl yview] # # When displaying the information about the children of any # ancestor of the label widgets, the widths of some of the # labels and thus also the widths and x coordinates of some # children may change. For this reason, make sure the items # will be updated after any change in the sizes of the labels # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl root |
| | > | | | | > > > > > > > > | |
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 .. 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ... 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
#============================================================================== # Demonstrates how to use a tablelist widget for displaying information about # the children of an arbitrary widget. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 namespace eval demo { variable dir [file dirname [info script]] # # Create two images corresponding to the display's DPI scaling level # set pct $::tablelist::scalingpct variable compImg [image create bitmap -file [file join $dir comp$pct.xbm] \ -background yellow -foreground gray50] variable leafImg [image create bitmap -file [file join $dir leaf$pct.xbm] \ -background coral -foreground gray50] } source [file join $demo::dir config_tile.tcl] # # Work around the improper appearance of the tile scrollbars in the aqua theme # ................................................................................ $tbl columnconfigure $col -sortmode integer } foreach col {6 7} { $tbl columnconfigure $col -formatcommand demo::formatBoolean } ttk::scrollbar $vsb -orient vertical -command [list $tbl yview] # # On X11 configure the tablelist according # to the display's DPI scaling level # if {[tk windowingsystem] eq "x11"} { $tbl configure -treestyle bicolor$::tablelist::scalingpct } # # When displaying the information about the children of any # ancestor of the label widgets, the widths of some of the # labels and thus also the widths and x coordinates of some # children may change. For this reason, make sure the items # will be updated after any change in the sizes of the labels # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl root |
Changes to examples/tablelist/browse_tile.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
...
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying information about # children of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 namespace eval demo { variable dir [file dirname [info script]] # # Create two images, needed in the procedure putChildren # variable leafImg [image create bitmap -file [file join $dir leaf.xbm] \ -background coral -foreground gray50] variable compImg [image create bitmap -file [file join $dir comp.xbm] \ -background yellow -foreground gray50] } source [file join $demo::dir config_tile.tcl] # # Work around the improper appearance of the tile scrollbars in the aqua theme # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl |
|
|
>
|
|
|
|
|
|
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
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying information about # children of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 namespace eval demo { variable dir [file dirname [info script]] # # Create two images corresponding to the display's DPI scaling level # set pct $::tablelist::scalingpct variable compImg [image create bitmap -file [file join $dir comp$pct.xbm] \ -background yellow -foreground gray50] variable leafImg [image create bitmap -file [file join $dir leaf$pct.xbm] \ -background coral -foreground gray50] } source [file join $demo::dir config_tile.tcl] # # Work around the improper appearance of the tile scrollbars in the aqua theme # ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the data of the given widget's children # putChildren $w $tbl |
Changes to examples/tablelist/bwidget.tcl.
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
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# widgets from the BWidget package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.4 ;# because of "-compound" package require tablelist 6.9 package require BWidget wm title . "Serial Line Configuration" # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option.tcl] option add *Tablelist*Entry.background white # # Register some widgets from the BWidget package for interactive cell editing # tablelist::addBWidgetEntry tablelist::addBWidgetSpinBox tablelist::addBWidgetComboBox # # 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] # # Create a tablelist widget with editable columns (except the first one) # set tbl .tbl tablelist::tablelist $tbl \ -columns {0 "No." right 0 "Available" center ................................................................................ } set btn [button .btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 10 pack $tbl -side top -expand yes -fill both #------------------------------------------------------------------------------ # editStartCmd # # Applies some configuration options to the edit window; if the latter is a # ComboBox, the procedure populates it. |
|
>
>
>
>
>
>
<
<
<
<
<
<
|
|
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
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# widgets from the BWidget package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.4 ;# because of "-compound" package require tablelist 6.10 package require BWidget wm title . "Serial Line Configuration" # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option.tcl] option add *Tablelist*Entry.background white # # 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 some widgets from the BWidget package for interactive cell editing # tablelist::addBWidgetEntry tablelist::addBWidgetSpinBox tablelist::addBWidgetComboBox # # Create a tablelist widget with editable columns (except the first one) # set tbl .tbl tablelist::tablelist $tbl \ -columns {0 "No." right 0 "Available" center ................................................................................ } set btn [button .btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 7p pack $tbl -side top -expand yes -fill both #------------------------------------------------------------------------------ # editStartCmd # # Applies some configuration options to the edit window; if the latter is a # ComboBox, the procedure populates it. |
Changes to examples/tablelist/bwidget_tile.tcl.
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
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the BWidget package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 package require BWidget 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*Entry.background white # # Register some widgets from the BWidget package for interactive cell editing # tablelist::addBWidgetEntry tablelist::addBWidgetSpinBox tablelist::addBWidgetComboBox # # 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] # # Improve the window's appearance by using a tile # frame as a container for the other widgets # set f [ttk::frame .f] # ................................................................................ } set btn [ttk::button $f.btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 10 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 |
|
>
>
>
>
>
>
<
<
<
<
<
<
|
|
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
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the BWidget package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 package require BWidget 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*Entry.background white # # 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 some widgets from the BWidget package for interactive cell editing # tablelist::addBWidgetEntry tablelist::addBWidgetSpinBox tablelist::addBWidgetComboBox # # Improve the window's appearance by using a tile # frame as a container for the other widgets # set f [ttk::frame .f] # ................................................................................ } 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 |
Changes to examples/tablelist/config.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying and editing the # configuration options of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.9 namespace eval demo { # # Get the current windowing system ("x11", "win32", "classic", or "aqua") # and add some entries to the Tk option database for the following # widget hierarchy within a toplevel widget of the class DemoTop: # ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the configuration options of the given widget # putConfig $w $tbl |
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying and editing the # configuration options of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.10 namespace eval demo { # # Get the current windowing system ("x11", "win32", "classic", or "aqua") # and add some entries to the Tk option database for the following # widget hierarchy within a toplevel widget of the class DemoTop: # ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the configuration options of the given widget # putConfig $w $tbl |
Changes to examples/tablelist/config_tile.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying and editing the # configuration options of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 namespace eval demo { # # Get the current windowing system ("x11", "win32", or "aqua") # and add some entries to the Tk option database for the following # widget hierarchy within a toplevel widget of the class DemoTop: # ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the configuration options of the given widget # putConfig $w $tbl |
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
#============================================================================== # Demonstrates how to use a tablelist widget for displaying and editing the # configuration options of an arbitrary widget. # # Copyright (c) 2000-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 namespace eval demo { # # Get the current windowing system ("x11", "win32", or "aqua") # and add some entries to the Tk option database for the following # widget hierarchy within a toplevel widget of the class DemoTop: # ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the configuration options of the given widget # putConfig $w $tbl |
Changes to examples/tablelist/dirViewer.tcl.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 .. 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 ... 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# Demonstrates how to use a tablelist widget for displaying the content of a # directory. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.3 package require tablelist 6.9 # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option.tcl] ................................................................................ $tbl columnconfigure 0 -formatcommand formatString -sortmode dictionary $tbl columnconfigure 1 -formatcommand formatSize -sortmode integer $tbl columnconfigure 2 -formatcommand formatString scrollbar $vsb -orient vertical -command [list $tbl yview] scrollbar $hsb -orient horizontal -command [list $tbl xview] # # On X11 configure the tablelist and the scrollbars # according to the display's DPI scaling level # global winSys ;# see option.tcl if {[string compare $winSys "x11"] == 0} { set pct $tablelist::scalingpct set arrowSizeList {7x4 9x5 11x6 13x7 15x8} set idx [expr {($pct - 100) / 25}] set arrowSize [lindex $arrowSizeList $idx] $tbl configure -arrowstyle flat$arrowSize -treestyle bicolor$pct set defaultSbWidth [lindex [$vsb configure -width] 3] set sbWidth [expr {$defaultSbWidth * $pct / 100}] $vsb configure -width $sbWidth $hsb configure -width $sbWidth } # # Create a pop-up menu with one command entry; bind the script # associated with its entry to the <Double-1> event, too # set menu .menu ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 set padY [expr {10 * $tablelist::scalingpct / 100}] pack $b1 $b2 $b3 -side left -expand yes -pady $padY pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the content of the given directory # $tbl sortbycolumn 0 |
| | | | < < < < < < < < < < | |
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 .. 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 .. 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# Demonstrates how to use a tablelist widget for displaying the content of a # directory. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.3 package require tablelist 6.10 # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option.tcl] ................................................................................ $tbl columnconfigure 0 -formatcommand formatString -sortmode dictionary $tbl columnconfigure 1 -formatcommand formatSize -sortmode integer $tbl columnconfigure 2 -formatcommand formatString scrollbar $vsb -orient vertical -command [list $tbl yview] scrollbar $hsb -orient horizontal -command [list $tbl xview] # # On X11 configure the tablelist according # to the display's DPI scaling level # global winSys ;# see option.tcl if {[string compare $winSys "x11"] == 0} { $tbl configure -treestyle bicolor$tablelist::scalingpct } # # Create a pop-up menu with one command entry; bind the script # associated with its entry to the <Double-1> event, too # set menu .menu ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the content of the given directory # $tbl sortbycolumn 0 |
Changes to examples/tablelist/dirViewer_tile.tcl.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 .. 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 ... 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
#============================================================================== # Demonstrates how to use a tablelist widget for displaying the content of a # directory. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option_tile.tcl] ................................................................................ $tbl columnconfigure 0 -formatcommand formatString -sortmode dictionary $tbl columnconfigure 1 -formatcommand formatSize -sortmode integer $tbl columnconfigure 2 -formatcommand formatString ttk::scrollbar $vsb -orient vertical -command [list $tbl yview] ttk::scrollbar $hsb -orient horizontal -command [list $tbl xview] # # On X11 configure the tablelist and the scrollbars # according to the display's DPI scaling level # if {[tk windowingsystem] eq "x11"} { set pct $tablelist::scalingpct set arrowSizeList {7x4 9x5 11x6 13x7 15x8} set idx [expr {($pct - 100) / 25}] set arrowSize [lindex $arrowSizeList $idx] $tbl configure -arrowstyle flat$arrowSize -treestyle bicolor$pct ttk::style theme settings default { set defaultSbWidth [ttk::style lookup TScrollbar -width] } set sbWidth [expr {$defaultSbWidth * $pct / 100}] ttk::style configure TScrollbar -arrowsize $sbWidth -width $sbWidth } # # Create a pop-up menu with one command entry; bind the script # associated with its entry to the <Double-1> event, too # set menu .menu ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 set padY [expr {10 * $tablelist::scalingpct / 100}] pack $b1 $b2 $b3 -side left -expand yes -pady $padY pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the content of the given directory # $tbl sortbycolumn 0 |
| | | | < < < < < < < < < < < | |
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 .. 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 ... 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
#============================================================================== # Demonstrates how to use a tablelist widget for displaying the content of a # directory. # # Copyright (c) 2010-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 # # Add some entries to the Tk option database # set dir [file dirname [info script]] source [file join $dir option_tile.tcl] ................................................................................ $tbl columnconfigure 0 -formatcommand formatString -sortmode dictionary $tbl columnconfigure 1 -formatcommand formatSize -sortmode integer $tbl columnconfigure 2 -formatcommand formatString ttk::scrollbar $vsb -orient vertical -command [list $tbl yview] ttk::scrollbar $hsb -orient horizontal -command [list $tbl xview] # # On X11 configure the tablelist according # to the display's DPI scaling level # if {[tk windowingsystem] eq "x11"} { $tbl configure -treestyle bicolor$tablelist::scalingpct } # # Create a pop-up menu with one command entry; bind the script # associated with its entry to the <Double-1> event, too # set menu .menu ................................................................................ } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid $hsb -row 2 -column 0 -sticky ew grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $b1 $b2 $b3 -side left -expand yes -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Populate the tablelist with the content of the given directory # $tbl sortbycolumn 0 |
Changes to examples/tablelist/embeddedWindows.tcl.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 .. 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 .. 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 ... 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 ... 201 202 203 204 205 206 207 208 209 |
#============================================================================== # Demonstrates the use of embedded windows in tablelist widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.9 wm title . "Tk Library Scripts" # # Add some entries to the Tk option database # set dir [file dirname [info script]] ................................................................................ # # Create the font TkFixedFont if not yet present # catch {font create TkFixedFont -family Courier -size -12} # # Create an image to be displayed in buttons embedded in a tablelist widget # image create photo openImg -file [file join $dir open.gif] # # Create a vertically scrolled tablelist widget with 5 # dynamic-width columns and interactive sort capability # set tf .tf frame $tf -class ScrollArea ................................................................................ # file whose name is diplayed in the first column of the cell's row. #------------------------------------------------------------------------------ proc createFrame {tbl row col w} { # # Create the frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # frame $w -width 102 -height 14 -background ivory -borderwidth 1 \ -relief solid bindtags $w [lreplace [bindtags $w] 1 1 TablelistBody] # # Create the child frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # frame $w.f -height 12 -background red -borderwidth 1 -relief raised bindtags $w.f [lreplace [bindtags $w] 1 1 TablelistBody] # # Manage the child frame # set fileSize [$tbl cellcget $row,fileSize -text] place $w.f -relwidth [expr {double($fileSize) / $::maxSize}] } #------------------------------------------------------------------------------ # createButton # # Creates a button widget w to be embedded into the specified cell of the # tablelist widget tbl. ................................................................................ # # Manage the widgets # grid $txt -row 0 -column 0 -sticky news grid $vsb -row 0 -column 1 -sticky ns grid rowconfigure $tf 0 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -side bottom -pady 10 pack $tf -side top -expand yes -fill both # # Mark the file as seen # $tbl rowconfigure k$key -font BoldFont $tbl cellconfigure k$key,seen -text yes ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -side bottom -pady 10 pack $tf -side top -expand yes -fill both |
| > | > | > | | | | | |
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 .. 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 .. 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 ... 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 ... 204 205 206 207 208 209 210 211 212 |
#============================================================================== # Demonstrates the use of embedded windows in tablelist widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.10 wm title . "Tk Library Scripts" # # Add some entries to the Tk option database # set dir [file dirname [info script]] ................................................................................ # # Create the font TkFixedFont if not yet present # catch {font create TkFixedFont -family Courier -size -12} # # Create an image corresponding to the display's DPI scaling # level, to be displayed in buttons embedded in a tablelist widget # set pct $tablelist::scalingpct image create photo openImg -file [file join $dir openAction$pct.gif] # # Create a vertically scrolled tablelist widget with 5 # dynamic-width columns and interactive sort capability # set tf .tf frame $tf -class ScrollArea ................................................................................ # file whose name is diplayed in the first column of the cell's row. #------------------------------------------------------------------------------ proc createFrame {tbl row col w} { # # Create the frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # set height [expr {[font metrics $::tblFont -linespace] * 4 / 5}] frame $w -width 72p -height $height -background ivory -borderwidth 1 \ -relief solid bindtags $w [lreplace [bindtags $w] 1 1 TablelistBody] # # Create the child frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # frame $w.f -background red -borderwidth 1 -relief raised bindtags $w.f [lreplace [bindtags $w] 1 1 TablelistBody] # # Manage the child frame # set fileSize [$tbl cellcget $row,fileSize -text] place $w.f -relheight 1.0 -relwidth [expr {double($fileSize) / $::maxSize}] } #------------------------------------------------------------------------------ # createButton # # Creates a button widget w to be embedded into the specified cell of the # tablelist widget tbl. ................................................................................ # # Manage the widgets # grid $txt -row 0 -column 0 -sticky news grid $vsb -row 0 -column 1 -sticky ns grid rowconfigure $tf 0 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -side bottom -pady 7p pack $tf -side top -expand yes -fill both # # Mark the file as seen # $tbl rowconfigure k$key -font BoldFont $tbl cellconfigure k$key,seen -text yes ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -side bottom -pady 7p pack $tf -side top -expand yes -fill both |
Changes to examples/tablelist/embeddedWindows_tile.tcl.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 .. 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ... 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 ... 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 ... 237 238 239 240 241 242 243 244 245 246 |
#============================================================================== # Demonstrates the use of embedded windows in tablelist widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 wm title . "Tile Library Scripts" # # Add some entries to the Tk option database # set dir [file dirname [info script]] ................................................................................ # # Create the font TkFixedFont if not yet present # catch {font create TkFixedFont -family Courier -size -12} # # Create an image to be displayed in buttons embedded in a tablelist widget # image create photo openImg -file [file join $dir open.gif] if {[tablelist::getCurrentTheme] eq "aqua"} { # # Work around the improper appearance of the tile scrollbars # if {[package vcompare $::tk_patchLevel "8.6.10"] < 0} { interp alias {} ttk::scrollbar {} ::scrollbar ................................................................................ # file whose name is diplayed in the first column of the cell's row. #------------------------------------------------------------------------------ proc createFrame {tbl row col w} { # # Create the frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # frame $w -width 102 -height 14 -background ivory -borderwidth 1 \ -relief solid bindtags $w [lreplace [bindtags $w] 1 1 TablelistBody] # # Create the child frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # frame $w.f -height 12 -background red -borderwidth 1 -relief raised bindtags $w.f [lreplace [bindtags $w] 1 1 TablelistBody] # # Manage the child frame # set fileSize [$tbl cellcget $row,fileSize -text] place $w.f -relwidth [expr {double($fileSize) / $::maxSize}] } #------------------------------------------------------------------------------ # createButton # # Creates a button widget w to be embedded into the specified cell of the # tablelist widget tbl. ................................................................................ # # Manage the widgets # grid $txt -row 0 -column 0 -sticky news grid $vsb -row 0 -column 1 -sticky ns grid rowconfigure $tf 0 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Mark the file as seen # $tbl rowconfigure k$key -font BoldFont ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -pady 10 pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both |
| > | > | > | | | | | |
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 .. 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 ... 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 ... 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 ... 240 241 242 243 244 245 246 247 248 249 |
#============================================================================== # Demonstrates the use of embedded windows in tablelist widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 wm title . "Tile Library Scripts" # # Add some entries to the Tk option database # set dir [file dirname [info script]] ................................................................................ # # Create the font TkFixedFont if not yet present # catch {font create TkFixedFont -family Courier -size -12} # # Create an image corresponding to the display's DPI scaling # level, to be displayed in buttons embedded in a tablelist widget # set pct $tablelist::scalingpct image create photo openImg -file [file join $dir openAction$pct.gif] if {[tablelist::getCurrentTheme] eq "aqua"} { # # Work around the improper appearance of the tile scrollbars # if {[package vcompare $::tk_patchLevel "8.6.10"] < 0} { interp alias {} ttk::scrollbar {} ::scrollbar ................................................................................ # file whose name is diplayed in the first column of the cell's row. #------------------------------------------------------------------------------ proc createFrame {tbl row col w} { # # Create the frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # set height [expr {[font metrics $::tblFont -linespace] * 4 / 5}] frame $w -width 72p -height $height -background ivory -borderwidth 1 \ -relief solid bindtags $w [lreplace [bindtags $w] 1 1 TablelistBody] # # Create the child frame and replace the binding tag "Frame" # with "TablelistBody" in the list of its binding tags # frame $w.f -background red -borderwidth 1 -relief raised bindtags $w.f [lreplace [bindtags $w] 1 1 TablelistBody] # # Manage the child frame # set fileSize [$tbl cellcget $row,fileSize -text] place $w.f -relheight 1.0 -relwidth [expr {double($fileSize) / $::maxSize}] } #------------------------------------------------------------------------------ # createButton # # Creates a button widget w to be embedded into the specified cell of the # tablelist widget tbl. ................................................................................ # # Manage the widgets # grid $txt -row 0 -column 0 -sticky news grid $vsb -row 0 -column 1 -sticky ns grid rowconfigure $tf 0 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both # # Mark the file as seen # $tbl rowconfigure k$key -font BoldFont ................................................................................ grid $vsb -row 0 -rowspan 2 -column 1 -sticky ns } else { grid [$tbl cornerpath] -row 0 -column 1 -sticky ew grid $vsb -row 1 -column 1 -sticky ns } grid rowconfigure $tf 1 -weight 1 grid columnconfigure $tf 0 -weight 1 pack $btn -pady 7p pack $bf -side bottom -fill x pack $tf -side top -expand yes -fill both |
Changes to examples/tablelist/images.tcl.
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# # Copyright (c) 2011-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== # # Create two images, to be displayed in tablelist cells with boolean values # image create photo checkedImg -file [file join $dir checked.gif] image create photo uncheckedImg -file [file join $dir unchecked.gif] # # Create 16 images representing different colors # set colorNames { "red" "green" "blue" "magenta" "yellow" "cyan" "light gray" "white" ................................................................................ #FFFF00 #00FFFF #C0C0C0 #FFFFFF #800000 #008000 #000080 #800080 #808000 #008080 #808080 #000000 } foreach name $colorNames value $colorValues { set colors($name) $value } foreach value $colorValues { image create photo img$value -height 13 -width 13 img$value put gray50 -to 0 0 13 1 ;# top edge img$value put gray50 -to 0 1 1 12 ;# left edge img$value put gray75 -to 0 12 13 13 ;# bottom edge img$value put gray75 -to 12 1 13 12 ;# right edge img$value put $value -to 1 1 12 12 } |
>
|
|
>
>
>
|
|
|
|
|
|
|
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# # Copyright (c) 2011-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== # # Create two images, to be displayed in tablelist cells with boolean values # set pct $tablelist::scalingpct image create photo checkedImg -file [file join $dir checked$pct.gif] image create photo uncheckedImg -file [file join $dir unchecked$pct.gif] # # Create 16 images representing different colors # set colorNames { "red" "green" "blue" "magenta" "yellow" "cyan" "light gray" "white" ................................................................................ #FFFF00 #00FFFF #C0C0C0 #FFFFFF #800000 #008000 #000080 #800080 #808000 #008080 #808080 #000000 } foreach name $colorNames value $colorValues { set colors($name) $value } array set arr {100 13 125 16 150 20 175 23 200 26} set len $arr($pct) set len1 [expr {$len - 1}] foreach value $colorValues { image create photo img$value -height $len -width $len img$value put gray50 -to 0 0 $len 1 ;# top edge img$value put gray50 -to 0 1 1 $len1 ;# left edge img$value put gray75 -to 0 $len1 $len $len ;# bottom edge img$value put gray75 -to $len1 1 $len $len1 ;# right edge img$value put $value -to 1 1 $len1 $len1 ;# interior } |
Changes to examples/tablelist/iwidgets.tcl.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 .. 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 ... 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 ... 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 |
# widgets from the Iwidgets package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.4 ;# because of "-compound" package require tablelist 6.9 if {[catch {package require iwidgets} result1] != 0 && [catch {package require Iwidgets} result2] != 0} { error "$result1; $result2" } wm title . "Serial Line Configuration" ................................................................................ source [file join $dir option.tcl] option add *Tablelist*textBackground white option add *Tablelist*Entry.disabledBackground white option add *Tablelist*Entry.disabledForeground black option add *Tablelist*Dateentry*Label.background white option add *Tablelist*Timeentry*Label.background white # # Register some widgets from the Iwidgets package for interactive cell editing # tablelist::addIncrEntryfield tablelist::addIncrSpinint tablelist::addIncrCombobox tablelist::addIncrDateTimeWidget dateentry -seconds tablelist::addIncrDateTimeWidget timeentry -seconds # # 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] # # Create a tablelist widget with editable columns (except the first one) # set tbl .tbl tablelist::tablelist $tbl \ -columns {0 "No." right 0 "Available" center ................................................................................ } set btn [button .btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 10 pack $tbl -side top -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 -pasting no -fixed 20 ................................................................................ } parity { # # Populate the combobox and make it non-editable # $w insert list end None Even Odd Mark Space $w configure -editable no -listheight 120 } stopBits { # # Populate the combobox and make it non-editable # $w insert list end 1 1.5 2 $w configure -editable no -listheight 90 } handshake { # # Populate the combobox and make it non-editable # $w insert list end XON/XOFF RTS/CTS None $w configure -editable no -listheight 90 } actDate { # # Set the date format "%Y-%m-%d" # $w configure -int yes |
| > > > > > > < < < < < < | > | | | |
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 .. 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 ... 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 ... 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 |
# widgets from the Iwidgets package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.4 ;# because of "-compound" package require tablelist 6.10 if {[catch {package require iwidgets} result1] != 0 && [catch {package require Iwidgets} result2] != 0} { error "$result1; $result2" } wm title . "Serial Line Configuration" ................................................................................ source [file join $dir option.tcl] option add *Tablelist*textBackground white option add *Tablelist*Entry.disabledBackground white option add *Tablelist*Entry.disabledForeground black option add *Tablelist*Dateentry*Label.background white option add *Tablelist*Timeentry*Label.background white # # 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 some widgets from the Iwidgets package for interactive cell editing # tablelist::addIncrEntryfield tablelist::addIncrSpinint tablelist::addIncrCombobox tablelist::addIncrDateTimeWidget dateentry -seconds tablelist::addIncrDateTimeWidget timeentry -seconds # # Create a tablelist widget with editable columns (except the first one) # set tbl .tbl tablelist::tablelist $tbl \ -columns {0 "No." right 0 "Available" center ................................................................................ } set btn [button .btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 7p pack $tbl -side top -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] set pct $tablelist::scalingpct switch [$tbl columncget $col -name] { lineName { # # Set an upper limit of 20 for the number of characters # $w configure -pasting no -fixed 20 ................................................................................ } parity { # # Populate the combobox and make it non-editable # $w insert list end None Even Odd Mark Space $w configure -editable no -listheight [expr {120 * $pct / 100}] } stopBits { # # Populate the combobox and make it non-editable # $w insert list end 1 1.5 2 $w configure -editable no -listheight [expr {60 * $pct / 100}] } handshake { # # Populate the combobox and make it non-editable # $w insert list end XON/XOFF RTS/CTS None $w configure -editable no -listheight [expr {80 * $pct / 100}] } actDate { # # Set the date format "%Y-%m-%d" # $w configure -int yes |
Changes to examples/tablelist/iwidgets_tile.tcl.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 .. 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 ... 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 ... 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 |
# Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the Iwidgets package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 if {[catch {package require iwidgets} result1] != 0 && [catch {package require Iwidgets} result2] != 0} { error "$result1; $result2" } wm title . "Serial Line Configuration" ................................................................................ source [file join $dir option_tile.tcl] option add *Tablelist*textBackground white option add *Tablelist*Entry.disabledBackground white option add *Tablelist*Entry.disabledForeground black option add *Tablelist*Dateentry*Label.background white option add *Tablelist*Timeentry*Label.background white # # Register some widgets from the Iwidgets package for interactive cell editing # tablelist::addIncrEntryfield tablelist::addIncrSpinint tablelist::addIncrCombobox tablelist::addIncrDateTimeWidget dateentry -seconds tablelist::addIncrDateTimeWidget timeentry -seconds # # 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] # # Improve the window's appearance by using a tile # frame as a container for the other widgets # set f [ttk::frame .f] # ................................................................................ } set btn [ttk::button $f.btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 10 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 -pasting no -fixed 20 ................................................................................ } parity { # # Populate the combobox and make it non-editable # $w insert list end None Even Odd Mark Space $w configure -editable no -listheight 120 } stopBits { # # Populate the combobox and make it non-editable # $w insert list end 1 1.5 2 $w configure -editable no -listheight 90 } handshake { # # Populate the combobox and make it non-editable # $w insert list end XON/XOFF RTS/CTS None $w configure -editable no -listheight 90 } actDate { # # Set the date format "%Y-%m-%d" # $w configure -int yes |
| > > > > > > < < < < < < | > | | | |
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 .. 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 ... 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 ... 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 |
# Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the Iwidgets package and of the Tk core checkbutton and # menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 if {[catch {package require iwidgets} result1] != 0 && [catch {package require Iwidgets} result2] != 0} { error "$result1; $result2" } wm title . "Serial Line Configuration" ................................................................................ source [file join $dir option_tile.tcl] option add *Tablelist*textBackground white option add *Tablelist*Entry.disabledBackground white option add *Tablelist*Entry.disabledForeground black option add *Tablelist*Dateentry*Label.background white option add *Tablelist*Timeentry*Label.background white # # 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 some widgets from the Iwidgets package for interactive cell editing # tablelist::addIncrEntryfield tablelist::addIncrSpinint tablelist::addIncrCombobox tablelist::addIncrDateTimeWidget dateentry -seconds tablelist::addIncrDateTimeWidget timeentry -seconds # # Improve the window's appearance by using a tile # frame as a container for the other widgets # set f [ttk::frame .f] # ................................................................................ } 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] set pct $tablelist::scalingpct switch [$tbl columncget $col -name] { lineName { # # Set an upper limit of 20 for the number of characters # $w configure -pasting no -fixed 20 ................................................................................ } parity { # # Populate the combobox and make it non-editable # $w insert list end None Even Odd Mark Space $w configure -editable no -listheight [expr {120 * $pct / 100}] } stopBits { # # Populate the combobox and make it non-editable # $w insert list end 1 1.5 2 $w configure -editable no -listheight [expr {60 * $pct / 100}] } handshake { # # Populate the combobox and make it non-editable # $w insert list end XON/XOFF RTS/CTS None $w configure -editable no -listheight [expr {80 * $pct / 100}] } actDate { # # Set the date format "%Y-%m-%d" # $w configure -int yes |
Changes to examples/tablelist/miscWidgets.tcl.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 .. 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 .. 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# Oakley's combobox, the mentry widgets of type "Date" and "Time", and of the # Tk core entry, spinbox, checkbutton, and menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.4 ;# because of "-compound" and the spinbox widget package require tablelist 6.9 package require combobox package require mentry wm title . "Serial Line Configuration" # # Add some entries to the Tk option database ................................................................................ option add *Tablelist*Entry.background white option add *Tablelist*Spinbox.background white option add *Tablelist*Spinbox.readonlyBackground white option add *Tablelist*Combobox.background white option add *Tablelist*Combobox.elementBorderWidth 2 option add *Tablelist*Mentry.background white # # Register Bryan Oakley's combobox widget as well as the mentry # widgets of type "Date" and "Time" for interactive cell editing # tablelist::addOakleyCombobox tablelist::addDateMentry Ymd - tablelist::addTimeMentry HMS : # # 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] # # Create a tablelist widget with editable columns (except the first one) # set tbl .tbl tablelist::tablelist $tbl \ -columns {0 "No." right 0 "Available" center ................................................................................ } set btn [button .btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 10 pack $tbl -side top -expand yes -fill both #------------------------------------------------------------------------------ # editStartCmd # # Applies some configuration options to the edit window; if the latter is a # combobox, the procedure populates it. |
| > > > > > > < < < < < < | |
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 .. 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 .. 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# Oakley's combobox, the mentry widgets of type "Date" and "Time", and of the # Tk core entry, spinbox, checkbutton, and menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require Tk 8.4 ;# because of "-compound" and the spinbox widget package require tablelist 6.10 package require combobox package require mentry wm title . "Serial Line Configuration" # # Add some entries to the Tk option database ................................................................................ option add *Tablelist*Entry.background white option add *Tablelist*Spinbox.background white option add *Tablelist*Spinbox.readonlyBackground white option add *Tablelist*Combobox.background white option add *Tablelist*Combobox.elementBorderWidth 2 option add *Tablelist*Mentry.background white # # 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 Bryan Oakley's combobox widget as well as the mentry # widgets of type "Date" and "Time" for interactive cell editing # tablelist::addOakleyCombobox tablelist::addDateMentry Ymd - tablelist::addTimeMentry HMS : # # Create a tablelist widget with editable columns (except the first one) # set tbl .tbl tablelist::tablelist $tbl \ -columns {0 "No." right 0 "Available" center ................................................................................ } set btn [button .btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 7p pack $tbl -side top -expand yes -fill both #------------------------------------------------------------------------------ # editStartCmd # # Applies some configuration options to the edit window; if the latter is a # combobox, the procedure populates it. |
Changes to examples/tablelist/miscWidgets_tile.tcl.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 .. 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 ... 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# Demonstrates the interactive tablelist cell editing with the aid of Bryan # Oakley's combobox, the mentry widgets of type "Date" and "Time", and of the # Tk core entry, spinbox, checkbutton, and menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 package require combobox package require mentry wm title . "Serial Line Configuration" # # Add some entries to the Tk option database ................................................................................ option add *Tablelist*Entry.background white option add *Tablelist*Spinbox.background white option add *Tablelist*Spinbox.readonlyBackground white option add *Tablelist*Combobox.background white option add *Tablelist*Combobox.elementBorderWidth 2 option add *Tablelist*Mentry.background white # # Register Bryan Oakley's combobox widget as well as the mentry # widgets of type "Date" and "Time" for interactive cell editing # tablelist::addOakleyCombobox tablelist::addDateMentry Ymd - tablelist::addTimeMentry HMS : # # 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] # # Improve the window's appearance by using a tile # frame as a container for the other widgets # set f [ttk::frame .f] # ................................................................................ } set btn [ttk::button $f.btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 10 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 |
| > > > > > > < < < < < < | |
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 .. 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 ... 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# Demonstrates the interactive tablelist cell editing with the aid of Bryan # Oakley's combobox, the mentry widgets of type "Date" and "Time", and of the # Tk core entry, spinbox, checkbutton, and menubutton widgets. # # Copyright (c) 2004-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 package require combobox package require mentry wm title . "Serial Line Configuration" # # Add some entries to the Tk option database ................................................................................ option add *Tablelist*Entry.background white option add *Tablelist*Spinbox.background white option add *Tablelist*Spinbox.readonlyBackground white option add *Tablelist*Combobox.background white option add *Tablelist*Combobox.elementBorderWidth 2 option add *Tablelist*Mentry.background white # # 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 Bryan Oakley's combobox widget as well as the mentry # widgets of type "Date" and "Time" for interactive cell editing # tablelist::addOakleyCombobox tablelist::addDateMentry Ymd - tablelist::addTimeMentry HMS : # # Improve the window's appearance by using a tile # frame as a container for the other widgets # set f [ttk::frame .f] # ................................................................................ } 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 |
Changes to examples/tablelist/styles.tcl.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
#============================================================================== # Demonstrates some ways of improving the look & feel of a tablelist widget. # # Copyright (c) 2002-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.9 wm title . "Tablelist Styles" # # Get the current windowing system ("x11", "win32", "classic", # or "aqua") and add some entries to the Tk option database # ................................................................................ foreach row {0 1 2 3} { $tbl insert end \ [list "Cell $row,0" "Cell $row,1" "Cell $row,2" "Cell $row,3"] } } button .close -text "Close" -command exit frame .bottom -height 10 # # Manage the widgets # grid .f.tbl0 .f.tbl1 -sticky news -padx 5 -pady 5 grid .f.tbl2 .f.tbl3 -sticky news -padx 5 -pady 5 grid .f.tbl4 .f.tbl5 -sticky news -padx 5 -pady 5 grid .f.tbl6 .f.tbl7 -sticky news -padx 5 -pady 5 grid rowconfigure .f {0 1 2 3} -weight 1 grid columnconfigure .f {0 1} -weight 1 pack .bottom .close -side bottom pack .f -side top -expand yes -fill both -padx 5 -pady 5 |
|
<
>
|
|
|
|
|
|
|
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
#============================================================================== # Demonstrates some ways of improving the look & feel of a tablelist widget. # # Copyright (c) 2002-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist 6.10 wm title . "Tablelist Styles" # # Get the current windowing system ("x11", "win32", "classic", # or "aqua") and add some entries to the Tk option database # ................................................................................ foreach row {0 1 2 3} { $tbl insert end \ [list "Cell $row,0" "Cell $row,1" "Cell $row,2" "Cell $row,3"] } } button .close -text "Close" -command exit # # Manage the widgets # set pad {7p 0} grid .f.tbl0 .f.tbl1 -sticky news -padx $pad -pady $pad grid .f.tbl2 .f.tbl3 -sticky news -padx $pad -pady $pad grid .f.tbl4 .f.tbl5 -sticky news -padx $pad -pady $pad grid .f.tbl6 .f.tbl7 -sticky news -padx $pad -pady $pad grid rowconfigure .f {0 1 2 3} -weight 1 grid columnconfigure .f {0 1} -weight 1 pack .close -side bottom -pady 7p pack .f -side top -expand yes -fill both -padx {0 7p} |
Changes to examples/tablelist/styles_tile.tcl.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#============================================================================== # Demonstrates some ways of improving the look & feel of a tablelist widget. # # Copyright (c) 2002-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 wm title . "Tablelist Styles" # # Improve the window's appearance by using a tile # frame as a container for the other widgets # ................................................................................ foreach row {0 1 2 3} { $tbl insert end \ [list "Cell $row,0" "Cell $row,1" "Cell $row,2" "Cell $row,3"] } } ttk::button $f.close -text "Close" -command exit ttk::frame $f.bottom -height 10 # # Manage the widgets # grid $f.f.tbl0 $f.f.tbl1 -sticky news -padx 5 -pady 5 grid $f.f.tbl2 $f.f.tbl3 -sticky news -padx 5 -pady 5 grid $f.f.tbl4 $f.f.tbl5 -sticky news -padx 5 -pady 5 grid $f.f.tbl6 $f.f.tbl7 -sticky news -padx 5 -pady 5 grid rowconfigure $f.f {0 1 2 3} -weight 1 grid columnconfigure $f.f {0 1} -weight 1 pack $f.bottom $f.close -side bottom pack $f.f -side top -expand yes -fill both -padx 5 -pady 5 pack $f -expand yes -fill both |
|
<
>
|
|
|
|
|
|
|
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#============================================================================== # Demonstrates some ways of improving the look & feel of a tablelist widget. # # Copyright (c) 2002-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 wm title . "Tablelist Styles" # # Improve the window's appearance by using a tile # frame as a container for the other widgets # ................................................................................ foreach row {0 1 2 3} { $tbl insert end \ [list "Cell $row,0" "Cell $row,1" "Cell $row,2" "Cell $row,3"] } } ttk::button $f.close -text "Close" -command exit # # Manage the widgets # set pad {7p 0} grid $f.f.tbl0 $f.f.tbl1 -sticky news -padx $pad -pady $pad grid $f.f.tbl2 $f.f.tbl3 -sticky news -padx $pad -pady $pad grid $f.f.tbl4 $f.f.tbl5 -sticky news -padx $pad -pady $pad grid $f.f.tbl6 $f.f.tbl7 -sticky news -padx $pad -pady $pad grid rowconfigure $f.f {0 1 2 3} -weight 1 grid columnconfigure $f.f {0 1} -weight 1 pack $f.close -side bottom -pady 7p pack $f.f -side top -expand yes -fill both -padx {0 7p} pack $f -expand yes -fill both |
Changes to examples/tablelist/tileWidgets.tcl.
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
#============================================================================== # Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the tile package. # # Copyright (c) 2005-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.9 wm title . "Serial Line Configuration" # # Add some entries to the Tk option database # set dir [file dirname [info script]] ................................................................................ } set btn [ttk::button $f.btn -text "Close" -command exit] # # Manage the widgets # pack $btn -side bottom -pady 10 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 |
|
|
|
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
#============================================================================== # Demonstrates the interactive tablelist cell editing with the aid of some # widgets from the tile package. # # Copyright (c) 2005-2020 Csaba Nemethi (E-mail: csaba.nemethi@t-online.de) #============================================================================== package require tablelist_tile 6.10 wm title . "Serial Line Configuration" # # Add some entries to the Tk option database # set dir [file dirname [info script]] ................................................................................ } 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 |