diff options
author | dkf <dkf@noemail.net> | 2004-06-21 20:47:01 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-06-21 20:47:01 (GMT) |
commit | 89fae7c767fc576a47bff4e739a982414e7e84ec (patch) | |
tree | 30a7ea1280e6ac7322127879cb1ef4434f1bf669 /doc | |
parent | c10bd456b168026cdde68428d7936122f46a570d (diff) | |
download | tk-89fae7c767fc576a47bff4e739a982414e7e84ec.zip tk-89fae7c767fc576a47bff4e739a982414e7e84ec.tar.gz tk-89fae7c767fc576a47bff4e739a982414e7e84ec.tar.bz2 |
Added example
FossilOrigin-Name: a3e7ba1db4e3040ddca7f18628e232f6aa9c1c7d
Diffstat (limited to 'doc')
-rw-r--r-- | doc/popup.n | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/popup.n b/doc/popup.n index a1b49bd..603577e 100644 --- a/doc/popup.n +++ b/doc/popup.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: popup.n,v 1.2 1998/09/14 18:22:59 stanton Exp $ +'\" RCS: @(#) $Id: popup.n,v 1.3 2004/06/21 20:47:02 dkf Exp $ '\" .so man.macros .TH tk_popup n 4.0 Tk "Tk Built-In Commands" @@ -28,6 +28,22 @@ menu's upper left corner is positioned at the given point. Otherwise \fIentry\fR gives the index of an entry in \fImenu\fR and the menu will be positioned so that the entry is positioned over the given point. +.SH EXAMPLE +.CS +# Create a menu +menu .m +\.m add command \-label "Example 1" \-command bell +\.m add command \-label "Example 2" \-command bell + +# Create something to attach it to +pack [label .l \-text "Click me!"] + +# Arrange for the menu to pop up when the label is clicked +bind .l <1> {\fBtk_popup\fR .m %X %Y} +.CE + +.SH "SEE ALSO" +bind(n), menu(n), tk_optionMenu(n) .SH KEYWORDS menu, popup |