Page 1 of 1

tree control with check box for each entry

Posted: Sun Sep 05, 2010 3:19 am
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.

Posted: Sun Sep 05, 2010 6:15 am
by eranif

Posted: Sun Sep 05, 2010 6:27 am
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!!!

Posted: Sun Sep 05, 2010 7:40 am
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

Posted: Sun Sep 05, 2010 1:58 pm
by Auria
And if you use wxWidgets 2.9.x, wxDataViewCtrl is generally quite flexible and allows that kind of thing

Posted: Mon Sep 06, 2010 2:04 pm
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.

Posted: Fri Sep 17, 2010 2:47 am
by wutaozhao
this is easy, I have implemented it, just inherit from wxTreeCtrl, use hittest() and EVT_LEFT_DOWN, bind imagelist for each item