Re: Ugh! I am having trouble visualizing sizers.
- Posted by vmars Jul 06, 2009
- 1161 views
Yes, I see what you mean by 'like rubberbands'.
I have never seen a diagram of Sizers.
And I am trying to get an accurate visual of Sizers and how they fit together with other controls.
So, if I liken controls to a stack pancakes,
with wxFrame as the bottom pancake, and say the red pancakes are sizers and the non-red ones are other controls.
What I'd like to get confirmation on, is the positional characteristics of a sizer.
Ie., A sizer controls the THING(control) that sits directly on top of it, (Add_window_to_sizer).
And a sizer itself, sets upon the THING (control) that it is working for, as in (set_sizer)command.
So my friend, is my visual accurate. Or have I gotten it wrong?
Yep, that's correct. A sizer makes sure that everything inside of the sizer (sizers and other controls) change their size and position when the 'parent' of the sizer changes its size or shape.
Matt
Ah yes, 'rubberbands and pancakes'. Sounds like a Disney movie.
Thanks for that definition Matt. That helps a great deal; I have given up my 'pancakes' in favor of your rubberband 'inside of', a rubberband frame inside of a parent frame. Nice to have a verbal to go along with a visual.
Thanks! ...V .