[wxDesigner] Using Designer to subclass my GUI objects other than
dialogs
David Goldsmith
David.L.Goldsmith at noaa.gov
Mon Jul 2 11:26:09 PDT 2007
Hi! First, let me know if I shouldn't send my wxDesigner Q's here (and
if so, but you who are reading this are willing to field the occasional
wxDesigner question - and you're not Rob - reply off list and I'll
compile my own little wxDesigner help list).
Now for my present question. I'm porting a native libraries code to
wxWidgets using wxDesigner to reproduce the GUI. One of the features of
the old code is that the menu bar changes in response to the user
selecting certain menu bar items, but it changes only a little, most of
it stays the same. Leveraging wxDesigner, my first plan of attack was
to compose the main menu bar, then simply copy the whole thing and paste
it into a new menu bar object and add the additional material and then
swap out menu bars as appropriate in the main wxFrame. However, I
realized the more OO thing to do would be to subclass the main menu bar,
adding additional members as needed (and still swapping out exactly
which class is being used for the menu at any given time in the app, of
course).
I see that wxDesigner has a class-writing function for dialog objects,
but I don't see that functionality for any other objects. Also, I
examined the code that Designer actually produces, and it does not
appear to be creating a class to encapsulate even my main menu bar. Is
there a way to leverage Designer to help me perform the subclassing I
have described?
Thanks,
DG
--
ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>
More information about the wx-users
mailing list