Creating a spawnable dashboard

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
tjbell
In need of some credit
In need of some credit
Posts: 1
Joined: Mon Aug 12, 2019 8:04 am

Creating a spawnable dashboard

Post by tjbell »

I'm developing a dashboard containing several columns (inside a wxBoxSizer). Each column has a number of other fields showing lines of information relating to different users. I need to be able to add, remove and update each column regularly in response to detecting which users are registered etc. but I can't figure out the best way to implement a class to represent a user.

I need to be able to 'spawn' and delete new columns easily (i.e. create instances of wxStaticBoxSizer) with all of the other widgets inside.

Would the best way be to create a class to inherit from wxStaticBoxSizer (to represent a column) and add everything to that, or does wxWidgets provide a cleaner way to manage instances of UI components?

Thanks in advance?
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Creating a spawnable dashboard

Post by doublemax »

Would the best way be to create a class to inherit from wxStaticBoxSizer (to represent a column) and add everything to that...
That's the usual way to go. Derive from wxPanel (or any other class that might fit better).
or does wxWidgets provide a cleaner way to manage instances of UI components?
No. Just taking advantage of subclassing should be sufficient.
Use the source, Luke!
Post Reply