Thank you, for your reply. Your code above solved my problem, but i'm still not able to implement it in my original code.
I'm attaching my original code for reference. Any help is appreciated.
Please try these modifications, i.e. with an explicit minimum size for both list boxes:
self.panel.Screen1Editable2 = wx.ListBox(self.panel,
style = wx.LB_SINGLE, size=(20,20))
self.panel.Screen2Editable2 = wx.ListBox(self.panel, style
= wx.LB_SINGLE, size=(20,20))
I think it behaves better this way. Without the minimum size it
could be that the controls are setting their size themselves,
depending on the number of entries and this triggers a re-layout.
With the explicit sizes, the sizer takes those as base. I'm not
100% sure whether this explanation is correct, though.
You may want to replace your SetFont calls with this one right at
the top:
self.SetFont(wx.Font(12, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
The result is probably the same.
Regards,
Dietmar