I am having a problem with listbox which expand automatically to a certain amount when the window is resized.
I am attaching a demo code to illustrate the issue.
If you hit “x” button more than four times and try to resize the window a little then listbox expands unnecessarily.
I don’t know whether it’s default behavior or not. If it is a default behavior, then how can I correct it?
I want the listbox to expand freely like it does when there is no value in it.
demo.py (730 Bytes)
I'm not sure what you want to accomplish, but try this modification:
self.mainSizer.Add(self.List, 1, wx.ALL | wx.CENTER | wx.EXPAND, 20)
This makes the list box fill the available space vertically and horizontally.
Regards,
Dietmar
···
On 2/11/2018 2:41 PM, Jaideep Singh wrote:
I want the listbox to expand freely like it does when there is no value in it.
Sir,
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.
demo.py (3.66 KB)
Sir,
Thank you very much. Giving listboxes minimum size fixes my problem.
Your advice for replacing my SetFont calls is also very helpful.
Best Regards,
Jaideep