Focus to somewhere from treeview1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelec

txtName.Focu

end su


this code doesnt wor
i want to focus to txtname but i cant
is there any code for doing tha
 
bafidi said:
Private Sub TreeView1_AfterSelect(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles
TreeView1.AfterSelect

txtName.Focus

end sub



this code doesnt work
i want to focus to txtname but i cant
is there any code for doing that

It does work if you use the keyboard.
If you use the mouse, the Treeview gets the focus because the Treeview sets
the focus to itself when you release the mouse button.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 

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

Back
Top