Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

wxSmith : how to use title passed to wxDialog-based class's ctor ?

(1/1)

eranon:
I've derived a class from wxDialog. This one will be subject to have a different title for every instance. So, I would like to be able to apply the passed title parameter ; as the one originally present in wxDialog ctor and/or Create() method.

Is there a way to customize the auto-generated Create() written by wxSmith ?
Or a way to enter a variable rather than a string in the properties grid of the UI editor ?
Or a way to disable the auto-generated Create() and write our own one ?
Or a way to switch from Create() to an initialization list (better) ?

I've seen here : http://forums.codeblocks.org/index.php/topic,8969.0.html that the Create() customization was already in discussion in 2008... So, maybe it's now possible... but I don't know how.

MortenMacFly:

--- Quote from: eanon on November 02, 2012, 02:44:36 am ---Or a way to enter a variable rather than a string in the properties grid of the UI editor ?
Or a way to disable the auto-generated Create() and write our own one ?
Or a way to switch from Create() to an initialization list (better) ?

--- End quote ---
I am not sure myself, but did you try the use of macros?


--- Quote from: eanon on November 02, 2012, 02:44:36 am ---I've seen here : http://forums.codeblocks.org/index.php/topic,8969.0.html that the Create() customization was already in discussion in 2008... So, maybe it's now possible... but I don't know how.

--- End quote ---
No, but the solution presented there is still valid.

eranon:
What do you mean by going through macros, Morten ? To expand what where ? Otherwise, effectively, I'll apply the trick expressed in the other thread above ::)

--
EDIT : trick applied successfully.

Navigation

[0] Message Index

Go to full version