I forgot to post the environment for previous posts: wxPython 2.7,
wxWidgets 2.6.3, XP, all upgrades installed.
Leo users two wx.SplitterWindow's to lay out an outline log and body panes.
The main splitter contains the secondary splitter and the body pane. The
secondary splitter contains the outline pane and the log pane. The log pane
contains a wx.NoteBook.
In this complex environment, there appears to be a bug in wx.FlexGridSizer.
The following code works:
# Sizer 1 lays out the find/change areas.
sizer1 = wx.FlexGridSizer(2, 2, vgap=10,hgap=5)
sizer1.Add(self.find_ctrl,1,wx.EXPAND)
sizer1.Add(self.fLabel,0,wx.EXPAND)
sizer1.Add(self.change_ctrl,1,wx.EXPAND)
sizer1.Add(self.cLabel,0,wx.EXPAND)
find_ctrl and change_ctrl are wx.TextCtrl's. fLabel and cLabel are
wx.StaticText's. This code puts the labels to the *right* of the
wx.TextCtrl's. However, the following acts strangely (on XP at least).
sizer1 = wx.FlexGridSizer(2, 2, vgap=10,hgap=5)
sizer1.Add(self.fLabel,0,wx.EXPAND)
sizer1.Add(self.find_ctrl,1,wx.EXPAND)
sizer1.Add(self.cLabel,0,wx.EXPAND)
sizer1.Add(self.change_ctrl,1,wx.EXPAND)
This should (and does) add the labels to the *left* of the wx.TextCtrl's.
However, clicking on the find_ctrl widget causes the size of that widget to
expand so it covers the label (!) BTW, the change_ctrl widget does not
display this strange behavior.
You can see the entire source code at:
http://leo.tigris.org/source/browse/leo/plugins/__wx_gui.py?rev=1.32&view=log
There are also focus problems relating to the sizers just mentioned.
Clicking in the find/change areas can clear the text in those areas. Very
weird.
Edward
···
--------------------------------------------------------------------
Edward K. Ream email: edreamleo@charter.net
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------