CodeLite is great and the integration with wxFormBuilder is great but is it possible for CodeLite to have it's own GUI builder?
I ask because when using wxFB and I change the GUI I lose all the event handlers.
Ex:
I design a form with 2 buttons
Export the code
Add implementation for both OnClick events, for button 1 and 2
Then when I add Button 3 and regenerate the code i lose the implementation for OnClick button 1 and 2.
This behaviour is ok for small apps but when the buttons do complicated stuff it's hard to rewrite the implementations each time.
Please note that I'm a beginner with CodeLite so I might not discovered all the features
GUI Builder
-
- CodeLite Enthusiast
- Posts: 11
- Joined: Mon Apr 05, 2010 12:55 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
GUI Builder
~Dr.Optix (for the moment I'm busy with my own projects)
IDE: CodeLite, Code::Blocks, VisualStudio
Compiler: MinGW-TDM, VC++
Language: C++, C, C#, PHP, JavaScript, Python
Website: http://droptix.wordpress.com
IDE: CodeLite, Code::Blocks, VisualStudio
Compiler: MinGW-TDM, VC++
Language: C++, C, C#, PHP, JavaScript, Python
Website: http://droptix.wordpress.com
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: GUI Builder
This is the best approach that I find for using codelite with wxFB (this is how I use it):
- When you generate the classes from the wxFB, make sure you also generate an inherited class (Keyboard shortcut F6) - you should only generate them once.
- The inherited class is the files where you should place all your logic - do not edit the base classes generated from wxFB (since as you know they will overriden each time)
- When u need to add new events or new controls -> add them to the base classes - but this time only generate the code but without the inherited class (since you dont want them to override your code)
- Next, switch to codelite, right click on the project and select 'retag project' this step is necessary, since codelite will not detect the changes done to the base class (unless the base class files are opened inside the editor)
- Now, go to the inherited class header file, and right click inside it and select 'Code Generation / Refactoing -> Implement inherited virtual methods' - and codelite will add all the new methods which were added to the base class by wxFB
HTH,
Eran
- When you generate the classes from the wxFB, make sure you also generate an inherited class (Keyboard shortcut F6) - you should only generate them once.
- The inherited class is the files where you should place all your logic - do not edit the base classes generated from wxFB (since as you know they will overriden each time)
- When u need to add new events or new controls -> add them to the base classes - but this time only generate the code but without the inherited class (since you dont want them to override your code)
- Next, switch to codelite, right click on the project and select 'retag project' this step is necessary, since codelite will not detect the changes done to the base class (unless the base class files are opened inside the editor)
- Now, go to the inherited class header file, and right click inside it and select 'Code Generation / Refactoing -> Implement inherited virtual methods' - and codelite will add all the new methods which were added to the base class by wxFB
HTH,
Eran
Make sure you have read the HOW TO POST thread