Hello,
I am trying to figure out why code I developed under Windows
doesn't behave as expected when run under Linux. It seems that objects
such as text controls that have a toolbar as parent are not displayed.
The following code exhibits the problem. The text control is present
and correct under XP, wx 2.8.8.1, Python 2.5.2. No evidence of the text
control under Ubuntu 8.04, wx 2.8.7.1, Python2.5.2. The code is partly
generated by Boa Constructor. The code for the frame is pasted below.
Any pointers appreciated. Thanks.
Duncan
---------------------TestFrame.py-------------------
#Boa:Frame:Frame1
import wx
def create(parent):
return Frame1(parent)
[wxID_FRAME1, wxID_FRAME1TOOLBAR1,
] = [wx.NewId() for _init_ctrls in range(2)]
class Frame1(wx.Frame):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(624, 393), size=wx.Size(782, 408),
style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
self.SetClientSize(wx.Size(782, 408))
self.toolBar1 = wx.ToolBar(id=wxID_FRAME1TOOLBAR1, name='toolBar1',
parent=self, pos=wx.Point(0, 0), size=wx.Size(782, 32),
style=wx.TB_HORIZONTAL | wx.NO_BORDER)
self.SetToolBar(self.toolBar1)
def __init__(self, parent):
self._init_ctrls(parent)
self.textCtrl1 = wx.TextCtrl(id=-1, name='textCtrl1',
parent=self.toolBar1, pos=wx.Point(200, 0),
size=wx.Size(40, 20))