C. Iacob wrote:
Hi list,
I tried (with no success so far) to treat the F1 key on a special dialog box I wrote. This custom wxDialog has three wxSashLayoutWindows, like this:
* wxSashLayoutWindow* leftWnd;
wxSashLayoutWindow* rightWnd;
wxSashLayoutWindow* bottomWnd;*Each wxSashLayoutWindow is the parent of a custom wxPanel.
The wxEVT_KEY_UP handler on:
- the dialog is not called
- any of the wxSashLayoutWindow is not called
- any of the custom wxPanels is not called
- on the widgets belonging to the custom wxPanels is called if the widget has the focus.I could hook all wxEVT_KEY_UP events on the widgets belonging to the custom wxPanels , but... this is not enough, because quite often there is at least such a custom wxPanel which displays no widget (all are hidden or disabled).
How can I catch the F1 key globally on my dialog?
Try using a wx.AcceleratorTable
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!