summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-11-15 16:31:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-11-15 16:31:23 (GMT)
commit3a434ba219453fd64f028d94808cfd90d8ac9e91 (patch)
treeac310d0fde37500b63782a9488c96bce9c1faf8e
parent727a1eb8d327db15fa49faa75acf953c5a98e286 (diff)
downloadtk-3a434ba219453fd64f028d94808cfd90d8ac9e91.zip
tk-3a434ba219453fd64f028d94808cfd90d8ac9e91.tar.gz
tk-3a434ba219453fd64f028d94808cfd90d8ac9e91.tar.bz2
Added example for labels
-rw-r--r--ChangeLog2
-rw-r--r--doc/label.n23
2 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a1d7e5b..b15566b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2006-11-15 Donal K. Fellows <dkf@users.sf.net>
+ * doc/label.n: Added an example and some See Also refs.
+
* doc/ConfigWidg.3, doc/bind.n, doc/grid.n, doc/panedwindow.n:
* doc/text.n, doc/ttk_Geometry.3, doc/ttk_button.n:
* doc/ttk_checkbutton.n, doc/ttk_combobox.n, doc/ttk_dialog.n:
diff --git a/doc/label.n b/doc/label.n
index cc377c4..593e561 100644
--- a/doc/label.n
+++ b/doc/label.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: label.n,v 1.7 2004/08/16 14:01:10 dkf Exp $
+'\" RCS: @(#) $Id: label.n,v 1.8 2006/11/15 16:31:23 dkf Exp $
'\"
.so man.macros
.TH label n 4.0 Tk "Tk Built-In Commands"
@@ -71,7 +71,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
@@ -104,11 +103,29 @@ 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\\nHand\\nSide"
+\fBlabel\fR .r \-text "Right\\nHand\\nSide"
+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)
.SH KEYWORDS
label, widget