tree control with check box for each entry Topic is solved

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
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

tree control with check box for each entry

Post by ollydbg23 »

Hi, after searching this forum, I have found a similar question:
http://forums.wxwidgets.org/viewtopic.p ... cheque+box

But there is no answer about that question, my question is: is it implementated now?

I would also use the tree control like this:

Image

How can I have a check box for each tree entries.


thanks.
eranif
Moderator
Moderator
Posts: 610
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif »

IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Post by ollydbg23 »

thanks eran. In fact, The functionality I want is just the same as you did in Codelite's CC refactoring search result list.

I just consider adding this kind of tree to support CC refactoring in Codeblocks.

I will try it. thanks!!!
eranif
Moderator
Moderator
Posts: 610
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif »

Ah, for this I used my wxListCtrl with checkbox (and other improvements, like the ability to store wxClientData for each row):

http://codelite.svn.sourceforge.net/vie ... iew=markup

http://codelite.svn.sourceforge.net/vie ... iew=markup

Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

And if you use wxWidgets 2.9.x, wxDataViewCtrl is generally quite flexible and allows that kind of thing
"Keyboard not detected. Press F1 to continue"
-- Windows
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Post by ollydbg23 »

thanks, eran and Auria.

As codeblocks is currently(officially) depend on the 2.8.x version of wx, I'd prefer using the way eran suggests.

But I would think that using wxDataViewCtrl in the feature if codeblocks is official upgraded to use wx 2.9 or 3.x.
wutaozhao
In need of some credit
In need of some credit
Posts: 1
Joined: Fri Sep 17, 2010 2:31 am

Post by wutaozhao »

this is easy, I have implemented it, just inherit from wxTreeCtrl, use hittest() and EVT_LEFT_DOWN, bind imagelist for each item
Post Reply