Link to home
Start Free TrialLog in
Avatar of fatihdurgut
fatihdurgut

asked on

After Selecting Treeview in windows application

Hello,
i'm trying to make a mdi application wint vb.net,
i create a treview control on main form, users opens subforms by this treeview,
when a user click on a node AfterSelect event runs but
at the second time, it isn't work because node is already selected,
how can i unselect the active node in afterselet event handler ?
thanks
Avatar of EBatista
EBatista

you can do it by selecting a different node at run time but it will rise the AfterSelect event again.
why do you need that for?

Avatar of fatihdurgut

ASKER

in my after select event i open sub forms,
after user select the node a sub form open,
after a while if the user close the form, and again click the same nose
if it is already selected then it isn't open the form,
because after select event isn't work,
becouse it is already selected
i want to select root node when the user click any sub node,
by this trick  if the user click the same node second or third time it opens sub form again
this will select the root:

Me.TreeView1.SelectedNode=Me.TreeView1.Nodes(0)


regards
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thnks :)