summaryrefslogtreecommitdiffstats
path: root/library/demos/image2.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/demos/image2.tcl')
-rw-r--r--library/demos/image2.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/demos/image2.tcl b/library/demos/image2.tcl
index 7b3d748..2d7ba03 100644
--- a/library/demos/image2.tcl
+++ b/library/demos/image2.tcl
@@ -36,7 +36,7 @@ proc loadDir w {
proc selectAndLoadDir w {
global dirName
set dir [tk_chooseDirectory -initialdir $dirName -parent $w -mustexist 1]
- if {[string length $dir] != 0} {
+ if {$dir ne ""} {
set dirName $dir
loadDir $w
}
@@ -92,7 +92,7 @@ pack $w.dir.b -side left -fill y -padx {0 2m} -pady 2m
labelframe $w.f -text "File:" -padx 2m -pady 2m
listbox $w.f.list -width 20 -height 10 -yscrollcommand "$w.f.scroll set"
-scrollbar $w.f.scroll -command "$w.f.list yview"
+ttk::scrollbar $w.f.scroll -command "$w.f.list yview"
pack $w.f.list $w.f.scroll -side left -fill y -expand 1
$w.f.list insert 0 earth.gif earthris.gif teapot.ppm
bind $w.f.list <Double-1> "loadImage $w %x %y"