tags:

views:

97

answers:

1

Accelerators on wxPython do not seem to work with nested panels. In other words:

    -----------------------------------------------
    | Main panel                                  |
    | -----------------    -----------------      |
    | | Subpanel 1    |    | Subpanel 2    |      |
    | | accelerator   |    | accelerator   |      |
    | | key for 'a'   |    | key for 'b'   |      |
    | -----------------    -----------------      |
    -----------------------------------------------

When a control in subpanel 1 has focus, I want Alt+b to still trigger the control in subpanel 2 that uses b as its accelerator key. How do I do this?

If it matters, I'm loading the panel with xrc into a plain old wx.Frame.

A: 

If the main panel has the accelerator table with Alt+b, this should work. Maybe the sub-panels have their own accelerator tables that are conflicting? You might try inactivating these with subpanel.SetAcceleratorTable(wx.NullAcceleratorTable) for each subpanel.

tom10
This does not seem to work.
Daniel Straight