treeview with 3 state checkbox

Posted on 2005-05-04
Medium Priority
Last Modified: 2010-05-18

I am looking for a treeview control that has three state checkbox: ticked(true), unticked(neutral) and crossed(false).

If you have used  sql server, it's very much like those where you set table/query permissions, but in a treeview not listview.

idealy it's free...

Thanks very much!
Question by:ChenChen
1 Comment
LVL 22

Accepted Solution

danaseaman earned 1500 total points
ID: 13933557
The standard State ImageList which has the Checkboxes does not support TriState. You can replace it with your own ImageList. See article and code at http://btmtz.mvps.org/treeview/ with sample code at Download tvcheckboxesex.zip (17kb). You will need to add the Grayed(Indeterminate) state images.  You update the State ImageList using SendMessage(hWnd, TVM_SETIMAGELIST, TVSIL_STATE, ByVal himl).

Your best bet may be modifying the VbAccelerator Treeview(free with source code) at http://vbaccelerator.com/home/VB/Code/Controls/treeview/. You also need code to set the check state of child nodes when a parent node is clicked and code to set parent node check state to checked/grayed when a child node is clicked. There is a good Vb.net example of how to do this at http://www.codeproject.com/vb/net/vbnettristatechkbox.asp that you could perhaps adapt to Vb6.


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question