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 there wxformsbuilder plugin?

Started by indigo0086, February 07, 2008, 07:52:42 PM

Previous topic - Next topic

JGM


indigo0086

Quick question, what does the "extra code" in the properties menu do?

Also if I want to add my own members variables, is it safe to put it in the form's class or do I put it elsewhere.

byo

Quote from: indigo0086 on February 13, 2008, 02:59:57 PM
Quick question, what does the "extra code" in the properties menu do?

Also if I want to add my own members variables, is it safe to put it in the form's class or do I put it elsewhere.

Before I answer to the "extra code" question, there's one thing which should be known when working with wxSmith. It automatically regenerates parts of code - not whole files but only some blocks of it (it's the opposite of wxFormBuilder which regenerates whole files). Blocks are marked with special comments:

//(*<Some Name> - this comment opens auto-regenerated block
//*) - and this one closes it.

Anything between such comments should not be changed because wxSmith will overwrite the changes while editing the resource. Anything outside those blocks is not changed at all so you can safely add your stuff there.

The "extra code" property can be used when item require some adjustments just after it's created and before added to parent. This code will be added inside block regnerated by wxSmith marked with such comments:


//(*Initialize(<Class name>)
...
//*)


In the past it was used to setup icons for menu entries - after attaching such entry into parent menu, there was no way to change the icon - extra code added into wxSmith blocks was required.
Now since menu entries have icon property I don't know any practical and irreplaceable usage of "extra code" but I may be wrong so this property is still there :)

Regards
   BYO

indigo0086

So if I wanted to place global variables (global within the object's scope) that would change throughout the program, what strategy would you use.  Would you place it directly in the class (yet outside the generated code) or do some other sort of strategy?

Also how does Custom Control work?  It's just a black box.  How would I...Customize it. 

I hate asking here but can't find these details on the wiki.

MortenMacFly

Quote from: indigo0086 on February 14, 2008, 02:44:52 AM
I hate asking here but can't find these details on the wiki.
Off-topic: Maybe it's worth piping Byos answers directly into the WiKi then...?! ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

indigo0086

Navigating around the wiki is confusing enough as it is, where exactly would I put it?  Thee isn't even an "articles by category" page.

byo

I try to put most of things here. Currently there are only tutorials but it may also be a good starting point for some "things good to know"