How to add a user control inside a treeview control as a node

G

Guest

I am having one user control (containing two combobox and one button) , I
want to add
this control as a node in a treeview control , to be more precise now I want
my user control
acting a node in the treeview control instead of treenode .


we can not extend treenode class because if I do this then I can not add
Combobox and all to my control class .
we can not inherit from treenode collection class as it is haivng private
constructor.

so if I want my control as a node in the treeview control then we can extend
treeview class
and in that now I should have myControl's collection class which will
ADD,REMOVE my control from a treeview control.

How should I achieve this ?

Thanks in advance

Sunil Joshi.
 
E

Ed Kaim

I don't think it's possible to do this. The TreeNode class is basically a
wrapper for a label that has support for children (and an image or
checkbox). If the TreeNode were directly derived from Control, you'd
probably be able to subclass it, although that isn't even an option for you
from what you say.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top