I am having the following layout problem with wxPython
2.8.10.1 on Linux:
I have a dialog class with a main sizer (box) and two sub
sizers (both box). The upper sizer contains a
ScrolledWindow, the lower one a few buttons.
In my code I create more ScrolledWindows. They each contain
a grid sizer with labels on the left and text ctrls etc on
the right.
I then re-parent those ScrolledWindows into instances of the
dlg class with the following code:
# replace dummy panel
old_ea = self._PNL_ea
ea_pnl_szr = old_ea.GetContainingSizer()
ea_pnl_parent = old_ea.GetParent()
ea_pnl_szr.Remove(old_ea)
del old_ea
new_ea.Reparent(ea_pnl_parent)
self._PNL_ea = new_ea
ea_pnl_szr.Add(self._PNL_ea, 1, wx.EXPAND, 0)
...
# redraw layout
self.Layout()
main_szr = self.GetSizer()
main_szr.Fit(self)
self.Refresh()
self._PNL_ea.refresh()
(within the class the original scrolled window has the same
sizer, same parent, and same .Add() arguments)
The problem is this: The lower sizer/scrolled window with
the buttons is partially or completely overlaid by the upper
sizer/scrolled window until I resize the dialog manually.
Enlarging the dialog "enough" will remove the glitch.
Enlarging it not "enough" partially reveals the buttons.
Even after enlarging the dialog "enough" making it
sufficiently small again will again obstruct the buttons
fully or partially just like directly after creation.
Attached find 2 screen shots with partially obstructed
buttons. The other screenshot shows the way it should be
with fully visible buttons.
I did check the upper part grid sizer to not contain more
rows and columns than are needed.
Attached find the wxGlade generated Python code.
Anyone has any idea what to do ?
Karsten
wxgGenericEditAreaDlg2.py (4.71 KB)
···
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346