From: sturlamolden on 15 Nov 2009 22:42 On 14 Nov, 15:35, Dietmar Schwertberger <n...(a)schwertberger.de> wrote: > self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY ) > self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton", > wx.DefaultPosition, wx.DefaultSize, 0 ) > m_toolBar1.AddControl( m_button1 ) I can confirm this. There seems to be a bug in the generation of Python code for wxToolBar.
From: Dietmar Schwertberger on 17 Nov 2009 11:38 sturlamolden schrieb: > On 14 Nov, 15:35, Dietmar Schwertberger <n...(a)schwertberger.de> wrote: > >> self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY ) >> self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton", >> wx.DefaultPosition, wx.DefaultSize, 0 ) >> m_toolBar1.AddControl( m_button1 ) > > I can confirm this. There seems to be a bug in the generation of > Python code for wxToolBar. If anybody faces this problem before a new revision of wxFormBuilder will be available: an XML file need to be updated to correctly include self. The modification: wxformbuilder\output\plugins\common\xml\menutoolbar.pythoncode: <codegen language="Python"> <templates class="wxWindow"> <template name="toolbar_add">self.#parent $name.AddControl( self.$name )</template> </templates> Regards, Dietmar
First
|
Prev
|
Pages: 1 2 3 Prev: Psyco on 64-bit machines Next: run all scripts in sub-directory as subroutines? |