Has anyone ever noticed this before? If you add a treeview control and a command button to a new project and drop this code in the command buttons click event
Private Sub Command1_Click()
Dim nds As Nodes
Dim str As String
'
Set nds = TreeView1.Nodes
str = "Set Breakpoint Here and look at the nds Items in the Locals Window, there are 256?"
End Sub
set a break point at the str assignment and then run the app, click the command button and take a look at the "nds" variable in the Locals Window you will see that there are 256 Items set to Variant/Empty, and the Count property shows 0. I am assuming that the Nodes Collection must be some sort of Linked list (CMap?) that is initialized with enough memory for 256 Items, but I was wondering if anyone can confirm this assumption? Any insight?![[spin] [spin] [spin]](/data/assets/smilies/spin.gif)
If you choose to battle wits with the witless be prepared to lose.
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)
Private Sub Command1_Click()
Dim nds As Nodes
Dim str As String
'
Set nds = TreeView1.Nodes
str = "Set Breakpoint Here and look at the nds Items in the Locals Window, there are 256?"
End Sub
set a break point at the str assignment and then run the app, click the command button and take a look at the "nds" variable in the Locals Window you will see that there are 256 Items set to Variant/Empty, and the Count property shows 0. I am assuming that the Nodes Collection must be some sort of Linked list (CMap?) that is initialized with enough memory for 256 Items, but I was wondering if anyone can confirm this assumption? Any insight?
![[spin] [spin] [spin]](/data/assets/smilies/spin.gif)
If you choose to battle wits with the witless be prepared to lose.
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)