summaryrefslogtreecommitdiffstats
path: root/doc/button.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/button.n')
-rw-r--r--doc/button.n20
1 files changed, 18 insertions, 2 deletions
diff --git a/doc/button.n b/doc/button.n
index 333ff61..fcb44ff 100644
--- a/doc/button.n
+++ b/doc/button.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: button.n,v 1.11 2006/12/13 23:04:32 hobbs Exp $
+'\" RCS: @(#) $Id: button.n,v 1.12 2007/08/28 15:16:11 dkf Exp $
'\"
.so man.macros
.TH button n 4.4 Tk "Tk Built-In Commands"
@@ -177,8 +177,24 @@ actions occur: the button is completely non-responsive.
The behavior of buttons can be changed by defining new bindings for
individual widgets or by redefining the class bindings.
+.SH EXAMPLES
+This is the classic Tk "Hello, World!" demonstration:
+.PP
+.CS
+ \fBbutton\fR .b -text "Hello, World!" -command exit
+ pack .b
+.CE
+.PP
+This example demonstrates how to handle button accelerators:
+.PP
+.CS
+ \fBbutton\fR .b1 -text Hello -underline 0
+ \fBbutton\fR .b2 -text World -underline 0
+ bind . <Key-h> {.b1 flash; .b1 invoke}
+ bind . <Key-w> {.b2 flash; .b2 invoke}
+ pack .b1 .b2
+.CE
.SH "SEE ALSO"
ttk_button(n)
-
.SH KEYWORDS
button, widget