invoke problem vith treeview

D

Dzemo

I got this code to add TreeNode from my new Thread to TreeView

///
Private Delegate Function AddDelegate( ByVal text As String ) As TreeNode

Private Sub DoWork()
Me.TreeView1.Invoke( New AddDelegate(AddressOf Me.TreeView1.Nodes.Add),
New Object() {"Bla"} )
End Sub

Dim th As New Thread(AddressOf DoWork)
th.Start()
///

But I have TreeNode that have sub nodes. Can i add treenode instead of
TreeNode.text("BLA") in upper code? Any examples?

tnx
 
G

Guest

Dzemo,

What do you mean byCan i add treenode instead of
TreeNode.text("BLA") in upper code?
What the code you have posted is doing IS adding a TreeNode with the Text as
"BLA"

Sorry if I have misunderstood.
 

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