Solved

node selection

Posted on 1998-12-06
6
159 Views
Last Modified: 2010-05-03
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
Comment
Question by:mailsuhail
  • 3
  • 2
6 Comments
 

Author Comment

by:mailsuhail
ID: 1448451
Edited text of question
0
 
LVL 7

Accepted Solution

by:
Inteqam earned 0 total points
ID: 1448452
treeview.nodes.item(1).selected=true

0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1448453

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 7

Expert Comment

by:Inteqam
ID: 1448454
you can use my answer for multi selection , i think

0
 

Author Comment

by:mailsuhail
ID: 1448455
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
 
LVL 7

Expert Comment

by:Inteqam
ID: 1448456
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question