Artifact
feed3f723fb525a5c436a932639de7bea8e4d76d2c3f6172237423c96f749f43:
Attachment "tst.tcl" to
ticket [7f0c0c9b]
added by
marc_culler
2021-01-15 20:25:28.
package require Tk
lappend auto_path .
package require scrollutil
package require tablelist
set scroll 1
proc test {} {
set notebook .nb
ttk::notebook $notebook
grid $notebook -sticky news
grid columnconfigure . 0 -weight 1
grid rowconfigure . 0 -weight 1
grid columnconfigure $notebook 0 -weight 1
grid rowconfigure $notebook 0 -weight 1
foreach tab {A B C D E} {
set frame [frame $notebook.frame$tab]
set table1 [tablelist::tablelist $frame.table1 -columns "0 Name"]
set table2 [tablelist::tablelist $frame.table2 -columns "0 Name"]
for {set i 1} {$i < 35} {incr i} {
$table1 insert end [list "tab $tab col 1 line $i"]
$table2 insert end [list "tab $tab col 2 line $i"]
}
if {$::scroll} {
set scroll1 [scrollutil::scrollarea $frame.scroll1]
set scroll2 [scrollutil::scrollarea $frame.scroll2]
$scroll1 setwidget $table1
$scroll2 setwidget $table2
grid $scroll1 $scroll2 -sticky news
} else {
grid $table1 $table2 -sticky news
}
grid columnconfigure $frame 0 -weight 1
grid rowconfigure $frame 0 -weight 1
$notebook insert end $frame -text "Tab $tab"
}
update idletasks
$notebook select 0
wm geometry . 700x500+200+200
}
test