I want to limit the size of a list control box. Let us take the following code:
The result of above code is shown in picture below
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size=(380, 230))
hbox = wx.BoxSizer(wx.HORIZONTAL)
panel = wx.Panel(self, -1)
self.list = wx.ListCtrl(panel, -1, style=wx.LC_REPORT)
app = wx.App()
Students(None, -1, 'studs')
If I make the horizontal box sizer's proportion=0 (as shown in the code snippet below):
then the result of the code is shown in picture below:
The problem with proportion=1 is that after 'Age' column, there is a lot of empty space the list control box is eating up for the third column which doesn't exist.
The problem with proportion=0 is that it is too short in width.
I want to display the list control box with 'Name' and 'Age' columns only and save the rest of the space. How do I do that?