News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Import wxsmith file

Started by koen, June 28, 2007, 11:10:07 AM

Previous topic - Next topic

koen

I have been looking for this for a while, but I haven't been able to find a solution. Suppose I have created a frame with wxsmith in one project, and I like to use it in another one later one. How do I transfer the layout from the first project to the second one? I'm OK with manually copying the accompanying code, but I do not like to recreate the full layout in wxsmith.

byo

What do you exactly mean?
Do you want to have two different applications with same window (or it's part) ? Or do you want to use other designer to edit one window?

If it's the second one, you should create your window with XRC file which may be edited in external designer.

Regards
   BYO

koen

I have one project in which I created a frame. Now, I would like to use that frame in another project. What is the best way to do this?

One of the problems I'm seeing is that if I simply add the wxs file to my new project, it is somehow not associated with wxSmith. I can see the XML code, but I cannot convince wxSmith to load it so I can edit it. I guess I have to copy other resource files, source files or header files as well, but I'm not sure...

byo

Quote from: koen on June 29, 2007, 09:38:22 AM
One of the problems I'm seeing is that if I simply add the wxs file to my new project, it is somehow not associated with wxSmith. I can see the XML code, but I cannot convince wxSmith to load it so I can edit it. I guess I have to copy other resource files, source files or header files as well, but I'm not sure...

First thing you should do before copying is to create frame with same name in second project. Than you can overwrite wxs files and wxSmith will use the new one.

You can also try to copy&paste - it should work quite well when you have sizer-based resources. You select top-most sizer, copy it and paste into new empty frame.

Regards
   BYO

koen

Ah, I see. The creating and overwriting looks like a workaround. I would expect that adding a wxs file to the project would take care of that. Anyway, I'll try the workaround. Thanks!