Custom tree control

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
todinaca
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Aug 31, 2018 5:18 pm

Custom tree control

Post by todinaca »

Can wxWidgets do something like the following with a wxDataViewCtrl? The Bars | were added to add indentation.

We would hope the modified tree control could be something like the below, when the US National Change of Address would be clicked
[ X] US National Change of Address (all items untl Delivery Sequence File Validation are children under this item
| PAF ID [ enter PAF ID here] < this is a free form text box
| Match Logic <- this would a set of radio buttons below this tree control
| o Business, Individual, and Family
| o Individual and Family
| …
| Processing options <- This would be a set of checkbox's under this tree control item
| [ ] First Class Mail
| ….
[ ] Delivery Sequence File Validation
[ ] Another Service Option

Would all this need to be custom programming derived from the base wxWidgets classes?
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Custom tree control

Post by doublemax »

It would be very hard (if not impossible) to do this with a classical tree control). But i think it would also be unusual from a GUI point of view. Usually you would have a list of items on the left and when you select one of them, a panel to the right would appear with all the values, static and editable ones.

Another option would be an accordion control like this:
viewtopic.php?t=41506
Use the source, Luke!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Custom tree control

Post by PB »

Does it really need to be a tree? I would just have a panel with all those controls sitting in appropriate sizers and the panel would be shown/hidden on clicking the checkbox (= tree root) similarly to what wxCollapsiblePane does. And that's assuming that the controls need to be hidden and not just disabled.

It's hard to say without knowing the GUI and what the users expect but filling so much information could perhaps be split into steps, using something like a wizard...
Post Reply