ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-mac
tcl-mac
[MACTCL] menu accelerators
by John P Speno other posts by this author
Mar 25 2003 8:31PM messages near this date
Re: [MACTCL] Linking to Tcl library | Re: [MACTCL] menu accelerators
Platform: MacOS X 10.2.4, Tcl/Tk 8.4.2

I'm trying to get my app's menu accelerators working. The accelerators show
up in the menus, but pressing the key-combo, i.e. Command-T, does nothing.
Here's some code to test with:

proc hi {} {puts {hi}}
menu .mb
menu .mb.foomenu -tearoff 0
.mb add cascade -label "Foo" -menu .mb.foomenu
.mb.foomenu add command -label "Bar" -command hi -accelerator "Command-J"
. configure -menu .mb

If I click on the menu bar, and bring up the menu which contains my menu
item with the accelerator, then pressing the key-combo works. However, if
the menu isn't open, then it doesn't.

Is there a way to make this work as it should?

Thanks.


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Tcl-mac mailing list
Tcl-mac@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
Thread:
John P Speno
Daniel A. Steffen

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved