~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to gcl-tk/demos/mkLabel.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# mkLabel w
 
2
#
 
3
# Create a top-level window that displays a bunch of labels.
 
4
#
 
5
# Arguments:
 
6
#    w -        Name to use for new top-level window.
 
7
 
 
8
proc mkLabel {{w .l1}} {
 
9
    global tk_library
 
10
    catch {destroy $w}
 
11
    toplevel $w
 
12
    dpos $w
 
13
    wm title $w "Label Demonstration"
 
14
    wm iconname $w "Labels"
 
15
    message $w.msg -font -Adobe-times-medium-r-normal--*-180* -aspect 300 \
 
16
            -text "Five labels are displayed below: three textual ones on the left, and a bitmap label and a text label on the right.  Labels are pretty boring because you can't do anything with them.  Click the \"OK\" button when you've seen enough."
 
17
    frame $w.left
 
18
    frame $w.right
 
19
    button $w.ok -text OK -command "destroy $w"
 
20
    pack $w.msg -side top
 
21
    pack $w.ok -side bottom -fill x
 
22
    pack $w.left $w.right -side left -expand yes -padx 10 -pady 10 -fill both
 
23
 
 
24
    label $w.left.l1 -text "First label"
 
25
    label $w.left.l2 -text "Second label, raised just for fun" -relief raised
 
26
    label $w.left.l3 -text "Third label, sunken" -relief sunken
 
27
    pack $w.left.l1 $w.left.l2 $w.left.l3 \
 
28
            -side top -expand yes -pady 2 -anchor w
 
29
 
 
30
    label $w.right.bitmap -bitmap @$tk_library/demos/images/face.bmp \
 
31
            -borderwidth 2 -relief sunken
 
32
    label $w.right.caption -text "Tcl/Tk Proprietor"
 
33
    pack $w.right.bitmap $w.right.caption -side top
 
34
}