Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | # sayings.pl |
2 | ||
3 | use vars qw/$TOP/; | |
4 | ||
5 | sub sayings { | |
6 | ||
7 | # Create a top-level window containing a listbox with a bunch of | |
8 | # well-known sayings. The listbox can be scrolled or scanned in | |
9 | # two dimensions. | |
10 | ||
11 | my($demo) = @_; | |
12 | $TOP = $MW->WidgetDemo( | |
13 | -name => $demo, | |
14 | -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.', | |
15 | -title => 'Listbox Demonstration (well-known sayings)', | |
16 | -iconname => 'sayings', | |
17 | ); | |
18 | ||
19 | my $list = $TOP->Scrolled(qw/Listbox -width 20 -height 10 -setgrid 1 | |
20 | -scrollbars se/); | |
21 | $list->pack(qw/-expand yes -fill y/); | |
22 | ||
23 | $list->insert(0, | |
24 | 'Waste not, want not', | |
25 | 'Early to bed and early to rise makes a man healthy, wealthy, and wise', | |
26 | 'Ask not what your country can do for you, ask what you can do for your country', | |
27 | 'I shall return', | |
28 | 'NOT', | |
29 | 'A picture is worth a thousand words', | |
30 | 'User interfaces are hard to build', | |
31 | 'Thou shalt not steal', | |
32 | 'A penny for your thoughts', | |
33 | 'Fool me once, shame on you; fool me twice, shame on me', | |
34 | 'Every cloud has a silver lining', | |
35 | 'Where there\'s smoke there\'s fire', | |
36 | 'It takes one to know one', | |
37 | 'Take this job and shove it', | |
38 | 'Up a creek without a paddle', | |
39 | 'I\'m mad as hell and I\'m not going to take it any more', | |
40 | 'An apple a day keeps the doctor away', | |
41 | 'Don\'t look a gift horse in the mouth'); | |
42 | ||
43 | } # end sayings | |
44 | ||
45 | 1; |