summaryrefslogtreecommitdiffstats
path: root/doc/button.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-08-28 15:16:10 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-08-28 15:16:10 (GMT)
commit5397491a300effb666df74fee45b7ce334350586 (patch)
tree949a47d61ae43ae08199dc36040c6697e50fcba0 /doc/button.n
parent9fef5d810024d4e069a4792461495a17eda7d956 (diff)
downloadtk-5397491a300effb666df74fee45b7ce334350586.zip
tk-5397491a300effb666df74fee45b7ce334350586.tar.gz
tk-5397491a300effb666df74fee45b7ce334350586.tar.bz2
Assorted documentation improvements.
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