sizer-troubles

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
KaReL
Experienced Solver
Experienced Solver
Posts: 78
Joined: Mon Aug 30, 2004 8:52 am
Contact:

sizer-troubles

Post by KaReL » Mon Mar 21, 2005 12:51 pm

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
wxWidgets: SVN/trunk
OS: WinXP/2 + Ubuntu + Mac 10.4.11
Compiler: VS2005 + GCC 4.2 + GCC 4.0.1
-----
home: http://www.salvania.be

Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor » Mon Mar 21, 2005 2:00 pm

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.

KaReL
Experienced Solver
Experienced Solver
Posts: 78
Joined: Mon Aug 30, 2004 8:52 am
Contact:

Post by KaReL » Mon Mar 21, 2005 2:35 pm

Thanks!! That works like a charm ;) (thought that wxGridSizer was only for wxGrid :)).
wxWidgets: SVN/trunk
OS: WinXP/2 + Ubuntu + Mac 10.4.11
Compiler: VS2005 + GCC 4.2 + GCC 4.0.1
-----
home: http://www.salvania.be

Post Reply