XRC and dynamically created widgets?

John Salerno johnjsal at NOSPAMgmail.com
Mon Oct 2 13:07:01 PDT 2006


John Salerno wrote:

> self.frame.Bind(wx.EVT_MENU, self.OnNewPage, id=xrc.XRCID('newRecordMenuItem'))

One more quickie question: why does this line have to be written this 
way, with the id keyword argument, instead of like:

xrc.XCRCTRL(self.XXX, 'new RecordMenuItem')

Doesn't the Bind() method take a reference to the object as its third 
parameter? And why is the 'id' necessary? It didn't work when I left it out.




More information about the wxpython-users mailing list