Choosing GUI Module for Python

Dietmar Schwertberger news at
Tue Nov 17 17:38:44 CET 2009

sturlamolden schrieb:
> On 14 Nov, 15:35, Dietmar Schwertberger <n... at> 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:


<codegen language="Python">
   <templates class="wxWindow">
     <template name="toolbar_add">self.#parent $name.AddControl( 
self.$name )</template>



More information about the Python-list mailing list