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?
Creating a spawnable dashboard
-
- In need of some credit
- Posts: 1
- Joined: Mon Aug 12, 2019 8:04 am
-
- Moderator
- Posts: 19164
- Joined: Fri Apr 21, 2006 8:03 pm
- Location: $FCE2
Re: Creating a spawnable dashboard
That's the usual way to go. Derive from wxPanel (or any other class that might fit better).Would the best way be to create a class to inherit from wxStaticBoxSizer (to represent a column) and add everything to that...
No. Just taking advantage of subclassing should be sufficient.or does wxWidgets provide a cleaner way to manage instances of UI components?
Use the source, Luke!