|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
proc RunSample {w} { |
|
set top [frame $w.f -bd 1 -relief raised] |
|
set box [tixButtonBox $w.b -bd 1 -relief raised] |
|
|
|
pack $box -side bottom -fill both |
|
pack $top -side top -fill both -expand yes |
|
|
|
|
|
|
|
tixScrolledTList $top.st -options { |
|
tlist.orient vertical |
|
tlist.selectMode single |
|
} |
|
pack $top.st -expand yes -fill both -padx 10 -pady 10 |
|
|
|
|
|
|
|
set tlist [$top.st subwidget tlist] |
|
|
|
set numbers { |
|
one two three fours five six seven eight nine ten eleven |
|
twelve thirdteen fourteen |
|
} |
|
|
|
foreach num $numbers { |
|
$tlist insert end -itemtype imagetext -text $num \ |
|
-image [tix getimage openfold] |
|
} |
|
|
|
|
|
|
|
$box add ok -text Ok -command "destroy $w" -width 6 |
|
$box add cancel -text Cancel -command "destroy $w" -width 6 |
|
} |
|
|
|
if {![info exists tix_demo_running]} { |
|
wm withdraw . |
|
set w .demo |
|
toplevel $w; wm transient $w "" |
|
RunSample $w |
|
bind $w <Destroy> exit |
|
} |
|
|