3
# Create a top-level window that displays a bunch of labels.
6
# w - Name to use for new top-level window.
8
proc mkLabel {{w .l1}} {
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."
19
button $w.ok -text OK -command "destroy $w"
21
pack $w.ok -side bottom -fill x
22
pack $w.left $w.right -side left -expand yes -padx 10 -pady 10 -fill both
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
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