Where to intercept Alt-Keypress to simulate mnemonics

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
S.Volkenandt
Knows some wx things
Knows some wx things
Posts: 26
Joined: Tue Nov 14, 2006 1:51 pm
Location: Duesseldorf, Germany

Where to intercept Alt-Keypress to simulate mnemonics

Post by S.Volkenandt » Tue Jul 22, 2008 2:33 pm

Hello,

I have to extend a Notebook control (at present eranif's new Notebook control) to support mnemonics on tabs. But I am currently unable to intercept the corresponding keypresses to react to.

So far I've tried wxEVT_CHAR event handlers in the topmost widget (the notebook page) and all panels and the frame containing it (notebook tab, notebook tab container, notebook itself, mainwindow). I've also tried passing wxWANTS_CHARS to the constructor of each of those.

Nevertheless, the event handler never gets called when I press Alt-Key (i.e. Alt-A) somewhere. If there is a control somewhere on that page having that mnemonic, it activates, if there is no control with that mnemonic, just nothing happens.

Where can I intercept those mnemonic keys?

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Wed Jul 23, 2008 12:20 am


Post Reply