I'm trying to design a dash board in WX form builder for Python. I'm having trouble trying to figure out how to keep two horizontal sizers that are children to a vertical sizer from expanding far apart from each other. Below is a screen shot describing what I am referring to:
The blue arrow represents that I want the textbox control and the label to move up closer to the first label.
My first instinct is that is had something to do with the wx.EXPAND etc flags however, I was not able to change those in a manner that made the sizers come closer to each other. It's almost like every time I place a sizer it automatically tries to fit everything in the entire window...which makes it difficult to place items in precise locations on the form. Any suggestions on how to stop sizers from expanding to the entire frame window size?
My next course of action was to try and use a gridsizer or a flex grid sizer however, I've only used them through direct code, where you can select the exact location in the grid where you want to add a widget or object. With form builder, I'm finding that they are more difficult to use mainly because I can't insert objects at certain indices in the grid sizer. It inserts them sequentially:
1,1 -> 1,2 -> 1,3 -> 1,i -> 2,1 -> 2,2 -> 2,3 -> 2,i -> j,i
Which means that if I need to change something in the grid...Its very difficult. Is there something I'm missing that makes it easier to insert objects into the grid, other than sequentially?
Below is one of example of 5x5 grid sizer (not completely filled) where I have specified both the horizontal and vertical gaps = 0:
Besides being able to replace the button with a textbox at 1,4, I notice that the horizontal gap is clearly not zero even though I specified 0 for vertical and horizontal gaps. This also makes it very hard to design the form. Why is there a horizontal gap between buttons?