I create a wxFlexGridSizer(2), but I want the 1st child to be the whole 1st row (have the width of the parent), then start the 2nd row, each row have 2 child, is it possible?
And can wxSizer add another wxSizer as a child?
Can wxSizer not be the whole sizer of the parent thorough SetSizer, but just occupy part area of the panel, does it have API to set its posiont and size ?
wxSizer problem Topic is solved
Re: wxSizer problem
You need wxGridBagSizer for that.I create a wxFlexGridSizer(2), but I want the 1st child to be the whole 1st row (have the width of the parent), then start the 2nd row, each row have 2 child, is it possible?
Yes.And can wxSizer add another wxSizer as a child?
No.Can wxSizer not be the whole sizer of the parent thorough SetSizer, but just occupy part area of the panel, does it have API to set its posiont and size ?
Use the source, Luke!
Re: wxSizer problem
what is the API?I didn\'t find it ...And can wxSizer add another wxSizer as a child?
And I now doesn't use wxSizer. I completely set the position and size by myself, and I find it works well and more easy to get the right result when I scale them.
Re: wxSizer problem
wxSizer::Add(...) can take a wxWindow* or wxSizer* as parameter.
In you mean the panels on the scrolledwindow, yes, there is definitely no need to use sizers in that case.I completely set the position and size by myself, and I find it works well and more easy to get the right result when I scale them.
Use the source, Luke!
Re: wxSizer problem
I mean the small panels which owns some controls, and these small panels are on a big panel, then the big panels are on the scrollWindowdoublemax wrote:wxSizer::Add(...) can take a wxWindow* or wxSizer* as parameter.
In you mean the panels on the scrolledwindow, yes, there is definitely no need to use sizers in that case.I completely set the position and size by myself, and I find it works well and more easy to get the right result when I scale them.
I used to use the wxSizer on both the small and big panel, and use default position and size for the controls on small panel and the same as the small panel on the big panel...then use Fit()
But I found it's a litter hard to get the exactly right position and size for them when i scale, that's why I abandon wxSizer here, another reason is the scale is always applyed to the whole scrollWindow and all the panel.
And I really don't why use wxSizer , when I scale , it's hard to get the exact right result....
Re: wxSizer problem
what's ur opinion about scale problem? Is it better to use or not to use wxSizer?
I have to scale all the big panel on the wxScrollWindow, the small panel on the big panel, and the controls on the small panels.
I have to scale all the big panel on the wxScrollWindow, the small panel on the big panel, and the controls on the small panels.
Re: wxSizer problem
As the sizers don't know about your scaling, I'd tend against using sizers.
Use the source, Luke!