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
 
Back
Top