Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ollydbg on December 27, 2011, 02:23:43 am

Title: Is it possible to copy and past all panel in wxsmith?
Post by: ollydbg on December 27, 2011, 02:23:43 am
I'm design a wxform application, when after adding many items in a wxPanel, I found that I need a wxSizer to wrap the panel.

Unluckily, I found that I need to delete the wxPanel, and add all the items again, waste a lot of time.

My question is: Is it possible that I can either
1, add a wxSizer around the wxPanel
2, Cut the whole panel, and add the wxSizer, then past the whole panel in that wxSizer.

Or, Do I have to manually edit the wxs file? (It is a XML file, but I have tried and failed, wxSmith still delete all the inner items when I reopened the resource, maybe, I did not edit the wxs file correctly)

Thanks.
Title: Re: Is it possible to copy and past all panel in wxsmith?
Post by: Jenna on December 27, 2011, 11:05:03 am
I just tested it in the wxSmith branch and it works.

I created a wxFrame, added a panel with two subitems.
I cut the panel with Ctrl+x (the editor must have the focus), added a sizer, selected the "Insert new widgets into selected item" button and pasted the panel with Ctrl+v.

Seems to work in trunk also.
Title: Re: Is it possible to copy and past all panel in wxsmith?
Post by: ollydbg on December 27, 2011, 03:05:26 pm
selected the "Insert new widgets into selected item" button and pasted the panel with Ctrl+v.
I forgot to select this button, so I got failed.

Now, it works. Thanks jens.  :)