Page 1 of 1

sizer-troubles

Posted: Mon Mar 21, 2005 12:51 pm
by KaReL
Hi,

I am having a little troubles with sizers, the problem is this:

I have a few wxStaticText's with wxComboBox'es and wxTextCtrl's next to it.

<wxStaticText> <wxTextCtrl>
<wxStaticText> <wxTextCtrl>
<wxStaticText> <wxComboBox>

Ofcourse this works nice in sizers. But what I want is that all the wxStaticText's are nice aligned, as are all the textctrl's. And the textctrl's are the problem.

I can get them to align just next to the statictext, but not to the maximum length of the statictext.

I hope I explained this good enough for someone to give me a hint to solve this.


Image


Thanks

Posted: Mon Mar 21, 2005 2:00 pm
by Cursor
Are you using a wxGridSizer or wxFlexGridSizer to align them ?
They will align you controls line-by-line and column-by-column. I think they are the good sizer to align a simple form like your.

Posted: Mon Mar 21, 2005 2:35 pm
by KaReL
Thanks!! That works like a charm ;) (thought that wxGridSizer was only for wxGrid :)).