Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: spflanze on November 08, 2017, 12:17:48 am

Title: Inserting a new sizer between existing ones
Post by: spflanze on November 08, 2017, 12:17:48 am
Inside a verically aligned wxBoxerSizer I have several wxStaticBox sizers with items such as wxComboBox and wxGid in them. Now I need to add a new wxStaticBox sizer between two that already exist. I find I am not able to do this. When I try to the new sizer ends up inside an existing one, or it ends up outside them all but at the bottom of all of them.

How can this insertion between two existing sizers be done?

Is there a way to move a sizer or other item around in the Resources tab's tree? I could achieve my goal if I could change the order the sizers re listed in there.
Title: Re: Inserting a new sizer between existing ones
Post by: Jenna on November 08, 2017, 06:16:01 am
I guess you are talking about wxSmith here.

On the right side of the wxSmith "editor" you should have some buttons, id you place the mousepointer over theme a tooltip should be shown.
Click the fourth button ("Insert new widgets after current selection"), select the sizer,that should be before the new one in the "Resources"-tab of the "Management"-pane (or directly with the mouse), then click on the appropriate sizer in the "Layoout"-tab of the wxSmith "editor" and it should appear where you want it.
Title: Re: Inserting a new sizer between existing ones
Post by: spflanze on November 09, 2017, 02:02:11 am
Thanks for your help. This did work. Now I need to know now to move an already existing sizer between two other sizers. Can this be done? Or will I have to move the widgets within an existing sizer into a new sizer and then delete the emptied sizer?
Title: Re: Inserting a new sizer between existing ones
Post by: ollydbg on November 09, 2017, 05:01:44 pm
For me, If I can't do something with wxSmith GUI, then I just manually edit the wxs file, as it is a xml file which has the wxWidigets' XRC format.  ;)