PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?U3VuaWwgSm9zaGk=?=
Guest
Posts: n/a
 
      9th Dec 2004
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.
--
---------------------------------------------------------------------------------------
Anything can be sacrificed for the friendship , friendship cannot be
sacrificed for anything.
 
Reply With Quote
 
 
 
 
Ed Kaim
Guest
Posts: n/a
 
      13th Dec 2004
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.

"Sunil Joshi" <(E-Mail Removed)> wrote in message
news:E088FC56-2FB2-4F75-8AB1-(E-Mail Removed)...
>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.
> --
> ---------------------------------------------------------------------------------------
> Anything can be sacrificed for the friendship , friendship cannot be
> sacrificed for anything.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
table as node in a treeview control Sergio A. Microsoft C# .NET 3 5th Jun 2006 11:56 PM
how to select next node in treeview control =?Utf-8?B?cHJhdmVlbg==?= Microsoft Dot NET 4 26th Apr 2006 11:28 AM
Set selected node in Treeview control in ASP:NET 2.0 ? Anyone know this ? jesper_lofgren@yahoo.se Microsoft ASP .NET 1 28th Dec 2005 06:03 PM
How to add a sub-node of a treeview control JohnDing Microsoft Excel Programming 1 20th Dec 2004 09:30 AM
Traverse Node in TreeView Control Shaurya Vardhan Microsoft VB .NET 3 19th Apr 2004 11:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.