Joe Brown:
Dialogs have a built-in panel, frames do not.
Panels are responsible for managing navigation.
Since the frame does not have a panel enclosing the grid, I expect this
sort of issue will arise.
This *may* resolve the issue.
class FrameMain(wx.Frame):
def __init__(self, *args,**kwargs):
wx.Frame.__init__(self, *args,**kwargs)
p = wx.Panel(self, -1)
addgrid(p)
dlg = DialogMain(self,-1,title="Dialog")
dlg.ShowModal()
···
---
I thought exactly the same. I tested (w2k, Py2.4.1, wxpy261). It does
not work, the grid is not recieving the focus. Focus has to be forced.
I agree, adding a panel is always - in my experience - a good think.
jmf