News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Is it possible to copy and past all panel in wxsmith?

Started by ollydbg, December 27, 2011, 02:23:43 AM

Previous topic - Next topic

ollydbg

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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Jenna

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.

ollydbg

Quote from: jens on December 27, 2011, 11:05:03 AM
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.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.