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

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

Added original make3d

File size: 1.4 KB
Line 
1# button.tcl --
2#
3# This demonstration script creates a toplevel window containing
4# several button widgets.
5#
6# RCS: @(#) $Id: button.tcl,v 1.2 1998/09/14 18:23:27 stanton Exp $
7
8if {![info exists widgetDemo]} {
9    error "This script should be run from the \"widget\" demo."
10}
11
12set w .button
13catch {destroy $w}
14toplevel $w
15wm title $w "Button Demonstration"
16wm iconname $w "button"
17positionWindow $w
18
19label $w.msg -font $font -wraplength 4i -justify left -text "If you click on any of the four buttons below, the background of the button area will change to the color indicated in the button.  You can press Tab to move among the buttons, then press Space to invoke the current button."
20pack $w.msg -side top
21
22frame $w.buttons
23pack $w.buttons -side bottom -fill x -pady 2m
24button $w.buttons.dismiss -text Dismiss -command "destroy $w"
25button $w.buttons.code -text "See Code" -command "showCode $w"
26pack $w.buttons.dismiss $w.buttons.code -side left -expand 1
27
28button $w.b1 -text "Peach Puff" -width 10 \
29    -command "$w config -bg PeachPuff1; $w.buttons config -bg PeachPuff1"
30button $w.b2 -text "Light Blue" -width 10 \
31    -command "$w config -bg LightBlue1; $w.buttons config -bg LightBlue1"
32button $w.b3 -text "Sea Green" -width 10 \
33    -command "$w config -bg SeaGreen2;  $w.buttons config -bg SeaGreen2"
34button $w.b4 -text "Yellow" -width 10 \
35    -command "$w config -bg Yellow1;    $w.buttons config -bg Yellow1"
36pack $w.b1 $w.b2 $w.b3 $w.b4 -side top -expand yes -pady 2
Note: See TracBrowser for help on using the repository browser.