wxTreeCtrl with wxCheckListBox checking?

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
LloydWright
In need of some credit
In need of some credit
Posts: 3
Joined: Thu Aug 21, 2008 7:10 pm

wxTreeCtrl with wxCheckListBox checking?

Post by LloydWright » Thu Aug 21, 2008 7:27 pm

Hello,

I'm looking to use a wxTreeCtrl to mirror a directory structure on disk. However, I want a check box to appear by each entry (file on disk in my case) in the tree so I can select multiple entries. Is this possible with a wxTreeCtrl or is there some other widget I should be using?

Cheers,

Lloyd.

tan
Moderator
Moderator
Posts: 1471
Joined: Tue Nov 14, 2006 7:58 am
Location: Saint-Petersburg, Russia

Re: wxTreeCtrl with wxCheckListBox checking?

Post by tan » Thu Aug 21, 2008 7:55 pm

Hi,
LloydWright wrote:... so I can select multiple entries.
what about wxTR_MULTIPLE style? It does exactly what do you want.
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10

LloydWright
In need of some credit
In need of some credit
Posts: 3
Joined: Thu Aug 21, 2008 7:10 pm

Post by LloydWright » Fri Aug 22, 2008 7:09 am

I need to select multiple entries by ticking a check box rather than having to hold down CTRL or SHIFT. I can't see anything in the wxTreeCtrl docs and I'm not aware of any other widget that would have this behaviour?

tan
Moderator
Moderator
Posts: 1471
Joined: Tue Nov 14, 2006 7:58 am
Location: Saint-Petersburg, Russia

Post by tan » Fri Aug 22, 2008 7:18 am

Hi,
you can try wxTreeListCtrl on wxCode:
http://wxcode.sourceforge.net/showcomp. ... eeListCtrl
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10

LloydWright
In need of some credit
In need of some credit
Posts: 3
Joined: Thu Aug 21, 2008 7:10 pm

Post by LloydWright » Fri Aug 22, 2008 7:59 am

Had a play with that but don't think it has check box behaviour. I can make do with wxTreeCtrl, but ideally I'd want something like:

http://www.ucancode.net/CTreeCtrl/treectrl2.gif

Post Reply