]>
git.zerfleddert.de Git - micropolis/blob - src/tk/library/demos/mkLabel.tcl
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."
17 frame $w .
frame -borderwidth 10
18 pack append $w .
frame \
19 [ frame $w .
frame .right
-borderwidth 10 ] { right
} \
20 [ label $w .
frame .l1
-text "First label" ] { top
frame w pady
4 expand
} \
21 [ label $w .
frame .l2
-text "Second label, raised just for fun" \
22 -relief raised
] { top
frame w pady
4 expand
} \
23 [ label $w .
frame .l3
-text "Third label, sunken" -relief sunken
] \
24 { top
frame w pady
4 expand
}
25 pack append $w .
frame .right
\
26 [ label $w .
frame .right.
bitmap -bitmap @ $tk_library / demos
/ bitmaps
/ face
\
27 -borderwidth 2 -relief sunken
] top
\
28 [ label $w .
frame .right.caption
-text "Tcl/Tk Proprietor" ] bottom
29 button $w .ok
-text OK
-command "destroy $w "
31 pack append $w $w .msg
{ top
frame c
} $w .
frame { top expand fill
} \