Reputation:
self.sizer.Add(self.listBox, proportion=0, flag=wx.TOP | wx.LEFT, border=75)
the border of BOTTOM and LEFT is 75, how can i set the border of wx.LEFT to something else but still apply it to the same item.
Is there something like?: wx.LEFT = 40 wx.TOP = 130
If I use my code, it will set both wx.LEFT and wx.TOP to 75 (which i do not want). I want to set these items to different values. If anyone knows the answer, it would be greatly appreciated.
I cannot use
self.sizer.Add(self.listBox, proportion=0, flag=wx.LEFT, border=40)
self.sizer.Add(self.listBox, proportion=0, flag=wx.TOP, border=130)
It will return an error.
Upvotes: 3
Views: 1496
Reputation: 33071
The easiest way to do this is to nest sizers. So put this sizer itself in a second sizer with the border you want.
Upvotes: 3