summaryrefslogtreecommitdiffstats
path: root/doc/label.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/label.n')
-rw-r--r--doc/label.n26
1 files changed, 20 insertions, 6 deletions
diff --git a/doc/label.n b/doc/label.n
index 1aa5ee1..5e1139a 100644
--- a/doc/label.n
+++ b/doc/label.n
@@ -29,7 +29,7 @@ Specifies a desired height for the label.
If an image or bitmap is being displayed in the label then the value is in
screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);
for text it is in lines of text.
-If this option isn't specified, the label's desired height is computed
+If this option is not specified, the label's desired height is computed
from the size of the image or bitmap or text being displayed in it.
.OP \-state state State
Specifies one of three states for the label: \fBnormal\fR, \fBactive\fR,
@@ -44,10 +44,9 @@ Specifies a desired width for the label.
If an image or bitmap is being displayed in the label then the value is in
screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);
for text it is in characters.
-If this option isn't specified, the label's desired width is computed
+If this option is not specified, the label's desired width is computed
from the size of the image or bitmap or text being displayed in it.
.BE
-
.SH DESCRIPTION
.PP
The \fBlabel\fR command creates a new window (given by the
@@ -69,7 +68,6 @@ one of the characters may optionally be underlined using the
\fBunderline\fR option.
The label can be manipulated in a few simple ways, such as
changing its relief or text, using the commands described below.
-
.SH "WIDGET COMMAND"
.PP
The \fBlabel\fR command creates a new Tcl command whose
@@ -102,11 +100,27 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBlabel\fR
command.
-
.SH BINDINGS
.PP
When a new label is created, it has no default event bindings:
labels are not intended to be interactive.
-
+.SH EXAMPLE
+.CS
+# Make the widgets
+\fBlabel\fR .t \-text "This widget is at the top" \-bg red
+\fBlabel\fR .b \-text "This widget is at the bottom" \-bg green
+\fBlabel\fR .l \-text "Left\enHand\enSide"
+\fBlabel\fR .r \-text "Right\enHand\enSide"
+text .mid
+\.mid insert end "This layout is like Java's BorderLayout"
+# Lay them out
+pack .t \-side top \-fill x
+pack .b \-side bottom \-fill x
+pack .l \-side left \-fill y
+pack .r \-side right \-fill y
+pack .mid \-expand 1 \-fill both
+.CE
+.SH "SEE ALSO"
+labelframe(n), button(n), ttk::label(n)
.SH KEYWORDS
label, widget