Hi,
I am developping a microscope control program using wxWindows and wxPython for
many years - it's lots of fun, thanks to wxPython !!
(mainly Windows2000, but maybe Linux(GTK) soon)
In the main frame I am using wx.AcceleratorTable to define many keyboard
shortcuts like this:
<code>
import wx
_at = wx.AcceleratorTable([
(wx.ACCEL_NORMAL, wx.WXK_NUMPAD_MULTIPLY, 6013),
#<snip>
])
MainFrame.SetAcceleratorTable(_at)
wx.EVT_MENU(MainFrame, 6013, OnB) # for wxAcceleratorTable
</code>
(I actually don't even have that menu entry in the menu, but everything works
well)
NOW: I open a new window (top frame) that the user is interacting with using
the mouse; now the key-shortcut don't work (from that window) any more.
What is the best way of 'forwarding' these key-events back to the other
topFrame?
Hi,
I am developping a microscope control program using wxWindows and wxPython for many years - it's lots of fun, thanks to wxPython !! (mainly Windows2000, but maybe Linux(GTK) soon)
In the main frame I am using wx.AcceleratorTable to define many keyboard shortcuts like this:
<code>
import wx
_at = wx.AcceleratorTable([
(wx.ACCEL_NORMAL, wx.WXK_NUMPAD_MULTIPLY, 6013),
#<snip>
])
MainFrame.SetAcceleratorTable(_at)
wx.EVT_MENU(MainFrame, 6013, OnB) # for wxAcceleratorTable
</code>
(I actually don't even have that menu entry in the menu, but everything works well)
NOW: I open a new window (top frame) that the user is interacting with using the mouse; now the key-shortcut don't work (from that window) any more.
What is the best way of 'forwarding' these key-events back to the other topFrame?
Give the other frame an accelerator table too and bind the event to the same method.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!