wxDataViewListCtrl and Expander Columns?

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
OkaMoez
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Sep 25, 2019 4:53 am

wxDataViewListCtrl and Expander Columns?

Post by OkaMoez »

Hi,

I'm currently using a wxDataViewListCtrl and was wondering if I could easily add some datatree-like functionality. I'm currently using it to reflect a file system (kinda) and wanted to be able to group list entries by their parent folder and make them collapseable. Right now I don't see a way to do this while adding items as wxVariants.

I currently like the multiple column functionality of the wxDataViewListCtrl , but if another class would work better, I'm interested in suggestions.

Going through the documentation left me a little confused since there were a couple places that made it look like wxDataViewListCtrl might already have my desired functionality, but without enough detail for me to grasp how to do it.

Thanks!
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxDataViewListCtrl and Expander Columns?

Post by DavidHart »

Hi,

I've little wxDVC experience, so I'll leave a proper answer to those who know more. But:

There is a custom control that sounds like what you describe in eranif's wxCustomControls.

Regards,

David
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDataViewListCtrl and Expander Columns?

Post by doublemax »

OkaMoez wrote: Fri Nov 15, 2019 7:16 pm Going through the documentation left me a little confused since there were a couple places that made it look like wxDataViewListCtrl might already have my desired functionality...
wxDataViewListCtrl doesn't, but wxDataViewCtrl does. However, it does require more code to setup and use. Please build and run the "dataview" sample that comes with wxWidgets and check if it does what you want.
Use the source, Luke!
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: wxDataViewListCtrl and Expander Columns?

Post by evstevemd »

Hi,
OkaMoez wrote: Fri Nov 15, 2019 7:16 pm Hi,

I'm currently using a wxDataViewListCtrl and was wondering if I could easily add some datatree-like functionality. I'm currently using it to reflect a file system (kinda) and wanted to be able to group list entries by their parent folder and make them collapseable. Right now I don't see a way to do this while adding items as wxVariants.
Can you check wxTreeListCtrl?
https://docs.wxwidgets.org/trunk/classw ... _ctrl.html
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Post Reply