Author Topic: How to re-use a frame you made with wxsmith?  (Read 3312 times)

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
How to re-use a frame you made with wxsmith?
« on: December 29, 2007, 12:48:10 am »
I made a frame with some controls, sizers etc, using wxsmith.
Now in another project I want a similar frame. How can I import it from the old project?
I tried to add a copy of the wxs file to the new project, but it appears as a text file, I cannot edit it with wxsmith.

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: How to re-use a frame you made with wxsmith?
« Reply #1 on: December 29, 2007, 03:21:58 am »
you have to edit the project file manually. This is an example of the lines you have to add inside the extensions tag:

Code
<Extensions>
   <wxsmith version="1">
<gui name="wxWidgets" src="window.cpp" main="WindowFrameClass" init_handlers="necessary" language="CPP" />
   </wxsmith>
</Extensions>

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
Re: How to re-use a frame you made with wxsmith?
« Reply #2 on: December 29, 2007, 12:46:38 pm »
OK, that works, thank you.