When I make a column growable in the wxFlexGridSizer, I can use wxALIGN_LEFT and wxALIGN_RIGHT to move the control inside the cell.
I cannot do it if the column is not growable.
Here's an example:
When "MyLabel" static text control was wxALIGN_LEFT in wxFlexGridSizer:
And with wxALIGN_RIGHT:
So, What's the default size of cell I get for moving "MyLabel" around with a growable column?
Growable horizontal cell size in wxFlexGridSizer
Re: Growable horizontal cell size in wxFlexGridSizer
Hi,
The sizer is not a window, and therefore, does not have size.
Why do you want to know this?
Thank you.
The sizer is not a window, and therefore, does not have size.
Why do you want to know this?
Thank you.
Re: Growable horizontal cell size in wxFlexGridSizer
Hi,
I don't mean the sizer. I wrote the 'cell' inside wxFlexGridSizer sizer.
I don't mean the sizer. I wrote the 'cell' inside wxFlexGridSizer sizer.
Re: Growable horizontal cell size in wxFlexGridSizer
Hi,
The cell is also not a window.
One more time - why do you need this info? What problem you are trying to solve?
Thank you.
The cell is also not a window.
One more time - why do you need this info? What problem you are trying to solve?
Thank you.
Re: Growable horizontal cell size in wxFlexGridSizer
Then, how come the cell has a size? I know its not a window.
I am just trying to understand the behavior. Probably you don't know understand what I mean.
I am just trying to understand the behavior. Probably you don't know understand what I mean.
Re: Growable horizontal cell size in wxFlexGridSizer
I'm not sure i understand what your question is, either.
Each control has a minimum size which is determined by its content. In a non-growable column, the width of the column will be the width of the widest control in that column.
Each control has a minimum size which is determined by its content. In a non-growable column, the width of the column will be the width of the widest control in that column.
Use the source, Luke!
Re: Growable horizontal cell size in wxFlexGridSizer
Thanks, doublemax. I will try to shed some more light:
I understand what you said about a non-growable column.
But here as you can see that it is a growable column. Why is "MyLabel" aligned to that much far to right?
I understand what you said about a non-growable column.
But here as you can see that it is a growable column. Why is "MyLabel" aligned to that much far to right?
Re: Growable horizontal cell size in wxFlexGridSizer
My guess is that you force the sizer to fill the whole width of the parent (sizer) with wxEXPAND and then the sizer will make both columns equal size. Try making the right column growable and see what happens.
Use the source, Luke!
Re: Growable horizontal cell size in wxFlexGridSizer
Hi,
Can you show the code?
Thank you.
Can you show the code?
Thank you.