# This demonstration script creates a listbox that can be scrolled
4
# both horizontally and vertically. It displays a collection of
5
# well-known sayings.
6
#
7
# SCCS: @(#) sayings.tcl 1.7 97/03/02 16:27:10
8
9
if{![info exists widgetDemo]}{
10
error"This script should be run from the \"widget\" demo."
11
}
12
13
set w .sayings
14
catch{destroy $w}
15
toplevel $w
16
wm title $w"Listbox Demonstration (well-known sayings)"
17
wm iconname $w"sayings"
18
positionWindow $w
19
20
label $w.msg -font $font -wraplength 4i -justify left -text "The listbox below contains a collection of well-known sayings. You can scan the list using either of the scrollbars or by dragging in the listbox window with button 2 pressed."
$w.frame.list insert 0"Waste not, want not""Early to bed and early to rise makes a man healthy, wealthy, and wise""Ask not what your country can do for you, ask what you can do for your country""I shall return""NOT""A picture is worth a thousand words""User interfaces are hard to build""Thou shalt not steal""A penny for your thoughts""Fool me once, shame on you; fool me twice, shame on me""Every cloud has a silver lining""Where there's smoke there's fire""It takes one to know one""Curiosity killed the cat""Take this job and shove it""Up a creek without a paddle""I'm mad as hell and I'm not going to take it any more""An apple a day keeps the doctor away""Don't look a gift horse in the mouth"