Hi all.
Perhaps this question is dumb, but I am very new to XRC. I have a class
deriving from wxPanel. I would like to have such panels on several of
the dialogs of my application. So, I went the "XRC and subclassing" way.
However, the contents of the panel are loaded from XRC, too.
The constructors of subclasses must take no other arguments but self.
LoadOnPanel requires a parent. What could I do?
Here is a code snippet. I have commented out the old constructor, before
XRC subclassing. There is a 'parent' argument at thAt the 2nd line of
the constructor, which curently generates an exception, because it does
not exist.
class PersonSelPanel(wx.Panel):
#def __init__(self, parent, id, pos, size, style, name):
def __init__(self):
self.Pre = wx.PrePanel()
xrc.XmlResource.Get().LoadOnPanel(self.Pre, parent, "ID_PN_PERSONSEL")
self.PostCreate(self.Pre)
self.BtFind = xrc.XRCCTRL(self, "ID_BT_FIND")
self.Bind(wx.EVT_BUTTON, self.onBtFind, self.BtFind)
return
Thank you very much.
Stavros