I'm currently putting the finishing touches on an application that I started
well over a year ago (I foolishly underestimated the time to completion
originally, and consequently felt so embarrassed a certain time ago that I
offered to finish the job without pay... not a wise idea really, doing
contract work for a friend!). When I originally modified the accelerator
table stuff from the [then] demo--way back around 2.1.11--I didn't need
entries for the top-level menus (Alt+F for the 'File' menu, etc.)--this was
done automatically by, e.g.,
self.mainmenu.Append(menu, '&File')
[where self.mainmenu is an instance of wxMenuBar]. However, at some point
since then, this convenient feature (probably a Windows-specific
thing)--i.e., of preceding the letter of the menu name with '&' to a) cause
that letter to be underlined, and b) to create an appropriate "accelerator
key" to make the menu drop down--was lost. I haven't worried about it too
much since I use a voice control system whereby I simply say "file" {I don't
use the keyboard much}, but I'm even slower using the mouse than the
keyboard, without my voice recognition system [DragonDictate], and I'd like
to be able to use the program at some sort of reasonable speed on computers
without such a system... anyway, the ability to use keyboard shortcuts in
general is important, not only to me. Does anyone know how to restore the
functionality that I mentioned? I'd prefer not to have to do the check in a
handler for EVT_CHAR_HOOK for the main frame, but I guess that might be the
obvious workaround? [Whoops, I almost forgot to say: menu COMMAND
accelerators--like Control+S for "File-> Save"--still work; one simply does,
e.g.,
menu.Append(wxID_SAVE, '&Save\tCtrl+S', 'Save the project in the
current '
'mine specification file')
--again, I think this way be a Windows-specific feature?]
Thanks for bothering to read this!
Cheerio, Chris
···
-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@uq.net.au> Phone:(07) 3870 5639
Brisbane, Australia Mobile:(0400) 833 700
-------------------------------------------------------------------------
"Experience is the hardest kind of teacher.
It gives you the test first,
and the lesson afterward."
- - Corrie Ten Boom
When I originally modified the accelerator
table stuff from the [then] demo--way back around 2.1.11--I didn't need
entries for the top-level menus (Alt+F for the 'File' menu, etc.)--this
was
done automatically by, e.g.,
self.mainmenu.Append(menu, '&File')
[where self.mainmenu is an instance of wxMenuBar]. However, at some point
since then, this convenient feature (probably a Windows-specific
thing)--i.e., of preceding the letter of the menu name with '&' to a)
cause
that letter to be underlined, and b) to create an appropriate "accelerator
key" to make the menu drop down--was lost.
Works for me. Does it still work in the demo for you?
I forgot to try the demo! Yes, it works there. I can't see why it doesn't
in my application, because it was modeled closely on the demo (at least the
main frame setup) a while ago and I THANK I've kept up with changes...
apparently not though! I'd better go over it again (and again, and...)...
Cheers
···
-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@uq.net.au> Phone:(07) 3870 5639
Brisbane, Australia Mobile:(0400) 833 700
-------------------------------------------------------------------------
If blood will flow when flesh and steel are one / Drying in the colour
of the evening sun / Tomorrow's rain will wash the stains away /
But something in our minds will always stay. - Sting
-----Original Message-----
From: wxpython-users-admin@lists.sourceforge.net
[mailto:wxpython-users-admin@lists.sourceforge.net]On Behalf Of Robin
Dunn
Sent: Wednesday, 20 December 2000 2:05 PM
To: wxPython-users
Subject: Re: [wxPython] Accelerators, not for menu COMMANDS, but for the
top-level menus themselves...?
> When I originally modified the accelerator
> table stuff from the [then] demo--way back around 2.1.11--I didn't need
> entries for the top-level menus (Alt+F for the 'File' menu, etc.)--this
was
> done automatically by, e.g.,
> self.mainmenu.Append(menu, '&File')
> [where self.mainmenu is an instance of wxMenuBar]. However, at
some point
> since then, this convenient feature (probably a Windows-specific
> thing)--i.e., of preceding the letter of the menu name with '&' to a)
cause
> that letter to be underlined, and b) to create an appropriate
"accelerator
> key" to make the menu drop down--was lost.
Works for me. Does it still work in the demo for you?