|
-
Apr 21st, 2003, 02:36 PM
#1
Thread Starter
yay gay
How do i create an instance of a TreeNodeCollection?
i tried:
Dim Tree as new TreeNodeCollection() but it seems not to want to work..any ideias of what i am doing wrong? 
edit: it seems it needs a TreeNode as constructor but still it is said to be as private...any ways around of doing this?
Last edited by PT Exorcist; Apr 21st, 2003 at 02:42 PM.
\m/  \m/
-
Apr 21st, 2003, 03:58 PM
#2
Thread Starter
yay gay
damn just found out it is internal..i'll try to recreate it though
\m/  \m/
-
Apr 21st, 2003, 04:02 PM
#3
Fanatic Member
Don't use New and it seems to work. Not sure if this answers your question though...
-
Apr 21st, 2003, 05:01 PM
#4
Thread Starter
yay gay
whats the use if i dont use New? if i dont use New then i am not creating an instance and that way i can do $null with it
\m/  \m/
-
Apr 21st, 2003, 05:23 PM
#5
You can use an array of nodes or a collection. You can also build on to one node and then transfer all of its children nodes to an existing TreeNodecollection. What is it you are trying to do with the TreeNodeCollection?
-
Apr 21st, 2003, 05:24 PM
#6
Thread Starter
yay gay
i would like to have a treeview with some new functionality...that way i wanted to have a a treenode that when the user made the Nodes.Add() it'd throw an event
\m/  \m/
-
Apr 21st, 2003, 05:39 PM
#7
Are you inheriting the normal treeview? Wouldn't that give you access to the TreeNodeCollection from the base object?
You can't override the Nodes property but you can shadow it and check for a change in the count or something of that nature.
They do make it a bit difficult to work with the TreeNodeCollection in any non-default manner don't they.
Last edited by Edneeis; Apr 21st, 2003 at 05:43 PM.
-
Apr 21st, 2003, 05:50 PM
#8
Thread Starter
yay gay
yes i am inheriting the treeview..but to make the change ill have to create another class that inherits from the TreeNodeCollection so i can make the changes and make the treeview 'Nodes' object point to my "extended" TreeNodeCollection, i can't use a normal array as it wouldn't create the correct items in the treeview i think..
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|