Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

node selection

how do we select a particular node in a treeview? Or what is the equivalent for treeview in the following  example of listbox.

private sub form_load()

list1.listindex= 0

end sub
0
mailsuhail
Asked:
mailsuhail
  • 3
  • 2
1 Solution
 
mailsuhailAuthor Commented:
Edited text of question
0
 
InteqamCommented:
treeview.nodes.item(1).selected=true

0
 
MirkwoodCommented:

set treeview1.selecteditem = treeview1.nodes(anode.key)

Where treeview1 is the treeview control and anode is a treeview  node

or like Inteqam said
treeview.nodes.item(1).selected=true

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
InteqamCommented:
you can use my answer for multi selection , i think

0
 
mailsuhailAuthor Commented:
when i pasted this code (suggested by Inteqam) in the Form_load event  it worked fine but when i tried it in Command_clik event it didn't work. Why?
0
 
InteqamCommented:
i think when clicking it , it will be selected automatically.
but make sure that the hide selection property of the tree view is false.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now