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

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

Overview
Comment: * ../../examples/scrollutil/*FrmContent.tcl: Minor improvements. * ../../examples/scrollutil/Sync*tcl:
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:3729a9f1201135e875be7ce9ebb3b2e030db7e341fee9ff2f8a47f6e4bbdc6d8
User & Date: csaba 2020-06-25 18:33:45
Context
2020-06-27
16:29
* CHANGES.txt: Minor improvements. * scripts/scaleutil.tcl: * doc/tablelist.html: check-in: 7829bf2a6c user: csaba tags: trunk
2020-06-25
18:33
* ../../examples/scrollutil/*FrmContent.tcl: Minor improvements. * ../../examples/scrollutil/Sync*tcl: check-in: 3729a9f120 user: csaba tags: trunk
18:32
* scripts/scaleutil.tcl: Made sure that the scaled default width of the Tk core scrollbar on X11 won't get overridden by an unscaled resource database value. check-in: 734e8d7a9f user: csaba tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to examples/scrollutil/BwScrollableFrmContent.tcl.

99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
114
set l [ttk::label $cf.l$row -text \
       "Tablelist release statistics, displayed in a tablelist widget:"]
grid $l -row $row -column 0 -columnspan 3 -sticky w -padx 7p -pady {7p 0}
incr row
set _sa [scrollutil::scrollarea $cf.sa$row]
set tbl [tablelist::tablelist $_sa.tbl \
	 -columns {0 "Release" left  0 "Changes" right  0 "Comment" left} \
	 -height 16 -width 0 -showseparators yes -stripebackground #f0f0f0 \

	 -incrarrowtype down -labelcommand tablelist::sortByColumn]
if {[$tbl cget -selectborderwidth] == 0} {
    $tbl configure -spacing 1
}
$tbl columnconfigure 0 -name release -sortmode dictionary
$tbl columnconfigure 1 -name changes -sortmode integer
$tbl columnconfigure 2 -name comment
$_sa setwidget $tbl







|
>
|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
set l [ttk::label $cf.l$row -text \
       "Tablelist release statistics, displayed in a tablelist widget:"]
grid $l -row $row -column 0 -columnspan 3 -sticky w -padx 7p -pady {7p 0}
incr row
set _sa [scrollutil::scrollarea $cf.sa$row]
set tbl [tablelist::tablelist $_sa.tbl \
	 -columns {0 "Release" left  0 "Changes" right  0 "Comment" left} \
	 -height 16 -width 0 -showseparators yes -incrarrowtype down \
	 -background white -stripebackground #f0f0f0 \
	 -labelcommand tablelist::sortByColumn]
if {[$tbl cget -selectborderwidth] == 0} {
    $tbl configure -spacing 1
}
$tbl columnconfigure 0 -name release -sortmode dictionary
$tbl columnconfigure 1 -name changes -sortmode integer
$tbl columnconfigure 2 -name comment
$_sa setwidget $tbl

Changes to examples/scrollutil/ScrolledFrmContent.tcl.

99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
114
set l [ttk::label $cf.l$row -text \
       "Tablelist release statistics, displayed in a tablelist widget:"]
grid $l -row $row -column 0 -columnspan 3 -sticky w -padx 7p -pady {7p 0}
incr row
set sa [scrollutil::scrollarea $cf.sa$row]
set tbl [tablelist::tablelist $sa.tbl \
	 -columns {0 "Release" left  0 "Changes" right  0 "Comment" left} \
	 -height 16 -width 0 -showseparators yes -stripebackground #f0f0f0 \

	 -incrarrowtype down -labelcommand tablelist::sortByColumn]
if {[$tbl cget -selectborderwidth] == 0} {
    $tbl configure -spacing 1
}
$tbl columnconfigure 0 -name release -sortmode dictionary
$tbl columnconfigure 1 -name changes -sortmode integer
$tbl columnconfigure 2 -name comment
$sa setwidget $tbl







|
>
|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
set l [ttk::label $cf.l$row -text \
       "Tablelist release statistics, displayed in a tablelist widget:"]
grid $l -row $row -column 0 -columnspan 3 -sticky w -padx 7p -pady {7p 0}
incr row
set sa [scrollutil::scrollarea $cf.sa$row]
set tbl [tablelist::tablelist $sa.tbl \
	 -columns {0 "Release" left  0 "Changes" right  0 "Comment" left} \
	 -height 16 -width 0 -showseparators yes -incrarrowtype down \
	 -background white -stripebackground #f0f0f0 \
	 -labelcommand tablelist::sortByColumn]
if {[$tbl cget -selectborderwidth] == 0} {
    $tbl configure -spacing 1
}
$tbl columnconfigure 0 -name release -sortmode dictionary
$tbl columnconfigure 1 -name changes -sortmode integer
$tbl columnconfigure 2 -name comment
$sa setwidget $tbl

Changes to examples/scrollutil/SuScrollableFrmContent.tcl.

99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
114
set l [ttk::label $cf.l$row -text \
       "Tablelist release statistics, displayed in a tablelist widget:"]
grid $l -row $row -column 0 -columnspan 3 -sticky w -padx 7p -pady {7p 0}
incr row
set _sa [scrollutil::scrollarea $cf.sa$row]
set tbl [tablelist::tablelist $_sa.tbl \
	 -columns {0 "Release" left  0 "Changes" right  0 "Comment" left} \
	 -height 16 -width 0 -showseparators yes -stripebackground #f0f0f0 \

	 -incrarrowtype down -labelcommand tablelist::sortByColumn]
if {[$tbl cget -selectborderwidth] == 0} {
    $tbl configure -spacing 1
}
$tbl columnconfigure 0 -name release -sortmode dictionary
$tbl columnconfigure 1 -name changes -sortmode integer
$tbl columnconfigure 2 -name comment
$_sa setwidget $tbl







|
>
|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
set l [ttk::label $cf.l$row -text \
       "Tablelist release statistics, displayed in a tablelist widget:"]
grid $l -row $row -column 0 -columnspan 3 -sticky w -padx 7p -pady {7p 0}
incr row
set _sa [scrollutil::scrollarea $cf.sa$row]
set tbl [tablelist::tablelist $_sa.tbl \
	 -columns {0 "Release" left  0 "Changes" right  0 "Comment" left} \
	 -height 16 -width 0 -showseparators yes -incrarrowtype down \
	 -background white -stripebackground #f0f0f0 \
	 -labelcommand tablelist::sortByColumn]
if {[$tbl cget -selectborderwidth] == 0} {
    $tbl configure -spacing 1
}
$tbl columnconfigure 0 -name release -sortmode dictionary
$tbl columnconfigure 1 -name changes -sortmode integer
$tbl columnconfigure 2 -name comment
$_sa setwidget $tbl

Changes to examples/scrollutil/SyncListboxes.tcl.

59
60
61
62
63
64
65


66
67
68
69
70
71
72
foreach country $countryList {
    $lb1 insert end "  $country  "
}
foreach capital $capitalList {
    $lb2 insert end "  $capital  "
}



set itemCount [$lb1 size]
for {set idx 1} {$idx < $itemCount} {incr idx 2} {
    $lb1 itemconfigure $idx -background #f0f0f0
    $lb2 itemconfigure $idx -background #f0f0f0
}

grid $lb1 $lb2 -sticky news -padx {0 1.5p}







>
>







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
foreach country $countryList {
    $lb1 insert end "  $country  "
}
foreach capital $capitalList {
    $lb2 insert end "  $capital  "
}

$lb1 configure -background white
$lb2 configure -background white
set itemCount [$lb1 size]
for {set idx 1} {$idx < $itemCount} {incr idx 2} {
    $lb1 itemconfigure $idx -background #f0f0f0
    $lb2 itemconfigure $idx -background #f0f0f0
}

grid $lb1 $lb2 -sticky news -padx {0 1.5p}

Changes to examples/scrollutil/SyncTablelists.tcl.

34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
set ss [scrollutil::scrollsync $sa.ss]
$sa setwidget $ss

#
# Populate the scrollsync widget with three tablelists
#


option add *Tablelist.stripeBackground  #f0f0f0

for {set n 1; set colWidth 40} {$n <= 3} {incr n; incr colWidth 20} {
    set tbl [tablelist::tablelist $ss.tbl$n \
	     -columns [list 0 "Column 0" left  $colWidth "Column 1" left]]
    set tbl$n $tbl

    for {set i 0} {$i < 100} {incr i} {







>
|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
set ss [scrollutil::scrollsync $sa.ss]
$sa setwidget $ss

#
# Populate the scrollsync widget with three tablelists
#

option add *Tablelist.background	white
option add *Tablelist.stripeBackground	#f0f0f0

for {set n 1; set colWidth 40} {$n <= 3} {incr n; incr colWidth 20} {
    set tbl [tablelist::tablelist $ss.tbl$n \
	     -columns [list 0 "Column 0" left  $colWidth "Column 1" left]]
    set tbl$n $tbl

    for {set i 0} {$i < 100} {incr i} {