# This demonstration script creates a simple collection of widgets
# that allow you to select and view images in a Tk label.
#
# widget demo 'load image' (called by 'widget')
#
# toplevel widget
ifdefined?($image2_demo)&&$image2_demo
$image2_demo.destroy
$image2_demo=nil
end
# demo toplevel widget
$image2_demo=TkToplevel.new{|w|
title('Image Demonstration #2')
iconname("Image2")
positionWindow(w)
}
# label
msg=TkLabel.new($image2_demo){
font$font
wraplength'4i'
justify'left'
text"This demonstration allows you to view images using a Tk \"photo\" image. First type a directory name in the listbox, then press Enter to load the directory into the listbox. Then double-click on a file name in the listbox to see that image."