summaryrefslogtreecommitdiffstats
path: root/doc/labelframe.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/labelframe.n')
-rw-r--r--doc/labelframe.n43
1 files changed, 40 insertions, 3 deletions
diff --git a/doc/labelframe.n b/doc/labelframe.n
index 7a5c6ec..fb3ea2f 100644
--- a/doc/labelframe.n
+++ b/doc/labelframe.n
@@ -6,7 +6,7 @@
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
-'\" RCS: @(#) $Id: labelframe.n,v 1.1 2001/09/26 21:36:19 pspjuth Exp $
+'\" RCS: @(#) $Id: labelframe.n,v 1.2 2006/11/16 11:22:32 dkf Exp $
'\"
.so man.macros
.TH labelframe n 8.4 Tk "Tk Built-In Commands"
@@ -134,14 +134,51 @@ 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 \fBlabelframe\fR
command.
-
.SH BINDINGS
.PP
When a new labelframe is created, it has no default event bindings:
labelframes are not intended to be interactive.
+.SH EXAMPLE
+This shows how to build part of a GUI for a hamburger vendor. The
+\fBlabelframe\fR widgets are used to organize the available choices by
+the kinds of things that the choices are being made over.
+.PP
+.CS
+grid [\fBlabelframe\fR .burger -text "Burger"] \\
+ [\fBlabelframe\fR .bun -text "Bun"] -sticky news
+grid [\fBlabelframe\fR .cheese -text "Cheese Option"] \\
+ [\fBlabelframe\fR .pickle -text "Pickle Option"] -sticky news
+foreach {type name val} {
+ burger Beef beef
+ burger Lamb lamb
+ burger Vegetarian beans
+
+ bun Plain white
+ bun Sesame seeds
+ bun Wholemeal brown
+ cheese None none
+ cheese Cheddar cheddar
+ cheese Edam edam
+ cheese Brie brie
+ cheese Gruy\\u00e8re gruyere
+ cheese "Monterey Jack" jack
+
+ pickle None none
+ pickle Gherkins gherkins
+ pickle Onions onion
+ pickle Chili chili
+} {
+ set w [radiobutton .$type.$val -text $name -anchor w \\
+ -variable $type -value $val]
+ pack $w -side top -fill x
+}
+set burger beef
+set bun white
+set cheese none
+set pickle none
+.CE
.SH "SEE ALSO"
frame(n), label(n)
-
.SH KEYWORDS
labelframe, widget