Bug? Notebook + Sizer

Edward K. Ream edreamleo at charter.net
Tue Jan 2 11:12:38 PST 2007


Here is a simpler example than provided in the posting 'Sizing Notebook
pages in a splitter window'. The following code does not work as expected on
XP. Perhaps something is hiding in plain sight.

In the wxPython demo, modify the Notebook demo as follows:

1. In TestNB.__init__ find the following lines:

win = ScrolledWindow.MyCanvas(self)
self.AddPage(win, 'ScrolledWindow')

2.  After these lines, add these lines:

win = self.makeColorPanel(wx.RED)
w1 = wx.TextCtrl(win)
w2 = wx.StaticText(win,label='Find Text')
sizer = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(w1,0,wx.EXPAND)
sizer.Add(w2,0,wx.EXPAND)
win.SetSizerAndFit(sizer)
self.AddPage(win,"EKR")

Run the modified demo.  Select the EKR tab.  Observe that the widgets are
not aligned properly.  In particular, on XP the TextCtrl overlaps the
StaticText, and the StaticText is not placed to the right as expected.

I would greatly appreciate any help.  Thanks.

wxPython 2.8.0.1 (wxMSW, unicode, wx-assertions-on, SWIG-1.3.29)
running on Python 2.4.  Windows XP, all service packs installed.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edreamleo at charter.net
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------







More information about the wxpython-users mailing list