Doesn''t happen for me either (on Windows).
Curt
Mehr, Assaph wrote:>
> Doesn''t seem to happen on Windows.
>
> WindowsXP, running ruby 1.8.1 (2003-12-25) [i386-mswin32] and wxRuby
> 0.3.
>
> HTH.
>
> -----Original Message-----
> From: wxruby-users-bounces@rubyforge.org
> [mailto:wxruby-users-bounces@rubyforge.org] On Behalf Of Kevin Smith
> Sent: Thursday, 6 May 2004 1:24 PM
> Cc: Wxruby users list
> Subject: [Wxruby-users] Re: Question about wxMenuBar
>
>
> I received this question off-list, but thought it would be interesting
> to everyone.
>
> > Hello,
> >
> > I am running my program that uses control shortcut keys
> > for the menu items I have declared in my menubar.
> > However, I noticed something strange happening,
> > shortcut commands can be over-written during runtime.
> >
> > example:
> >
> > I set my first menu item, in File Menu, to be the print
> > command with "Ctrl P" as the shortcut. So, I would type
> > "Alt F" to highlight the File menu, then, if I type
> > another command like "Ctrl X", the first item in the list
> > of menu items will change to be Ctrl X, in this case,
> > "Ctrl P" is now "Ctrl X".
> >
> > Do anyone know how I can prevent this from happening?
> > Your help will be greatly appreciated.
>
> Interesting. I couldn''t find this in the wxWindows documentation,
but I
> have seen similar behavior before in the Anjuta programmers editor.
> Basically, while any menu item is highlighted, hitting a key combination
>
> sets the shortcut for that menu item. At least, it does on my Linux
> system.
>
> You can see this in the minimal wxRuby sample. Bring up the File menu,
> and make sure the Exit item is highlighted. If you use Alt-F, it will
> already be highlighted. If you clicked on File, you need to hover over
> Exit.
>
> Now press a key like F1, or Ctrl-Y. Whatever key you press will become
> the shortcut for that item.
>
> It can be a handy feature, but it could also surprise users. I
don''t see
>
> any way to disable this feature, and I''m not sure what layer of
> wxWindows is performing this magic. Or maybe it''s just a GTK
thing. Does
>
> it happen on other platforms?
>
> Kevin
> _______________________________________________
> wxruby-users mailing list
> wxruby-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
> _______________________________________________
> wxruby-users mailing list
> wxruby-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.668 / Virus Database: 430 - Release Date: 4/24/2004
>