?
Solved

Treeview - How to simulate user click on a node?

Posted on 2003-02-21
5
Medium Priority
?
312 Views
Last Modified: 2010-05-01
If I click on a node in the treeview, it is highlighted. However, I would like the first node to be highlighted by default at Form activate before the user clicks any node. How do I achieve this?
0
Comment
Question by:JoeLalor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Accepted Solution

by:
sazhagianambi earned 200 total points
ID: 7998908
Hi

TreeView1.Nodes(1).Selected = True

Normally Root's Index is 1
This is used to select the First Node Of Tree.

Cheers,
Nambi
0
 
LVL 1

Expert Comment

by:xThorx
ID: 8025060
Or why don't you just put:
treeview1.setfocus
in form_activate ?
0
 
LVL 1

Expert Comment

by:sazhagianambi
ID: 8030997

SetFocus Method also Works.

Place this Into Form Load Or Activate,
TreeView1.Nodes(1).Selected = True

But Using this u can able to set focus any Item u want

Nambi
0
 

Expert Comment

by:CleanupPing
ID: 8901298
JoeLalor:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8964092
Moderator, my recommended disposition is:

    Accept sazhagianambi's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

764 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