source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/vrippack-0.31/lib/linux/tk8.4/demos/sayings.tcl @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 2.3 KB
Line 
1# sayings.tcl --
2#
3# 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# RCS: @(#) $Id: sayings.tcl,v 1.2 1998/09/14 18:23:30 stanton Exp $
8
9if {![info exists widgetDemo]} {
10    error "This script should be run from the \"widget\" demo."
11}
12
13set w .sayings
14catch {destroy $w}
15toplevel $w
16wm title $w "Listbox Demonstration (well-known sayings)"
17wm iconname $w "sayings"
18positionWindow $w
19
20label $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."
21pack $w.msg -side top
22
23frame $w.buttons
24pack $w.buttons -side bottom -fill x -pady 2m
25button $w.buttons.dismiss -text Dismiss -command "destroy $w"
26button $w.buttons.code -text "See Code" -command "showCode $w"
27pack $w.buttons.dismiss $w.buttons.code -side left -expand 1
28
29frame $w.frame -borderwidth 10
30pack $w.frame -side top -expand yes -fill y
31
32
33scrollbar $w.frame.yscroll -command "$w.frame.list yview"
34scrollbar $w.frame.xscroll -orient horizontal \
35    -command "$w.frame.list xview"
36listbox $w.frame.list -width 20 -height 10 -setgrid 1 \
37    -yscroll "$w.frame.yscroll set" -xscroll "$w.frame.xscroll set"
38
39grid $w.frame.list -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
40grid $w.frame.yscroll -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news
41grid $w.frame.xscroll -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news
42grid rowconfig    $w.frame 0 -weight 1 -minsize 0
43grid columnconfig $w.frame 0 -weight 1 -minsize 0
44
45
46$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"
Note: See TracBrowser for help on using the repository browser.