Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am currently trying to figure out the best way to create a treeview like control. I am trying to have a treeview that has a "Skin". Here is what I am looking to do.

1. The root node is just a label and an expander
2. The expander is like the windows vista (and newer) style (NOT THE PLUS MINUS SIGN)
3. Each of the child nodes are checkboxes. (Only the Root nodes will have child nodes)
4. The root nodes will have a different style than the child nodes and the child node checkboxes will be "skinned". I already have a custom drawn checkbox.

I have been toying with the idea to create my own control and do this but it is starting to become quite the task.

I have also tried to owner draw the treeview but the treeview seems to be very difficult compared to the other controls

Any ideas on where I can go from here?

Thanks
ZS

#EDIT
I also do not want to use any third party controls
It is also a Winforms Project
Posted
Updated 28-Oct-13 10:47am
v4
Comments
Sergey Alexandrovich Kryukov 28-Oct-13 16:38pm    
First of all, you need to tag the UI library/framework or application type you want to use.
Second thing is: why creating a control by yourself. What's wrong with using available controls?
—SA
Zach.Saunders 28-Oct-13 16:41pm    
I have a highly customized interface and the available controls do not look good with what I am trying to do
Sergey Alexandrovich Kryukov 28-Oct-13 21:55pm    
I can certainly understand that. But 1) I can hardly imagine how a general custom control development (this is what it is) can become a topic for a Quick Answer; perhaps, you have some particular concerns? 2) you want to add the tag "WinForms" to the question, using Improve question.
—SA
BillWoodruff 29-Oct-13 9:19am    
Creating your own TreeView from "scratch" is certainly not a trivial task, and, it is true that modifying the standard MS supplied TreeView Control for WinForms using inheritance, and owner-draw, is a pain.

However, have you really studied what other people have done in depth ?

https://www.google.com/search?q=c%23+owner-drawn+treeview&rlz=1C1CHMO_thTH526TH526&oq=c%23+owner-drawn+treeview&aqs=chrome..69i57j69i58j0.6247j0j4&sourceid=chrome&espv=210&es_sm=122&ie=UTF-8

http://stackoverflow.com/questions/9136910/treeview-custom-drawnode-net-3-5-windows-forms/9302514#9302514
Zach.Saunders 29-Oct-13 9:26am    
I have done a lot of research on the topic, thank you for finding the second link in the list. I remember seeing that one when I first started this but couldn't find it again. That one was really helpful. MSDN is really not helpful when it comes to this and there really isn't much on what I am looking to do so I was hoping that someone could give some input on what they have done in the past.

Again, thanks for the reply

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900