Move window inside a Sizer Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
duarteroso
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Jun 22, 2010 7:52 am

Move window inside a Sizer

Post by duarteroso »

Hi,

I'm searching for a way to place my windows inside a wxBoxSizer.
Right now, I have a BoxSizer and I'm trying to put a ComboBox and a ScrolledWindow side by side. But it seems that the sizer does not allow it, instead he put the ScrolledWindow under the ComboBox.


Cheers.
jfouche
Super wx Problem Solver
Super wx Problem Solver
Posts: 442
Joined: Tue May 06, 2008 4:52 pm
Location: France

Post by jfouche »

The is a parameter when you create the wxBoxSizer :

from doc :
wxBoxSizer::wxBoxSizer
wxBoxSizer(int orient)

Constructor for a wxBoxSizer. orient may be either of wxVERTICAL or wxHORIZONTAL for creating either a column sizer or a row sizer.
Jérémie
duarteroso
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Jun 22, 2010 7:52 am

Post by duarteroso »

In my case, i want both.

What I would like to have is almost like GarageBand or Magix Music Maker:
ComboBox ScrolledWindow
ComboBox ScrolledWindow
...and so on

Using the wxHORIZONTAL flag won't do the trick.
jfouche
Super wx Problem Solver
Super wx Problem Solver
Posts: 442
Joined: Tue May 06, 2008 4:52 pm
Location: France

Post by jfouche »

Ok, what you want is probably a wxFlexGridSizer

I suggest you to try the sizer sample provided with wxWidgets to see all available sizers, and take the one you need.

[edit] : you can also have a look here
Jérémie
duarteroso
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Jun 22, 2010 7:52 am

Post by duarteroso »

Thanks a lot.

I'll look around for some tips :wink:


Cheers
Post Reply