Treeview

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

Guest

Hi,

I have a menu that is a treeview, and I am using the after select
function to open the appropreate form, but once a node is selected, and the
form is open, if you want to open a second form from the same node, you have
to click another node, then click back on the node to run the after select
again.

Is there any way to get around this, for eg setting the node focus to
node index 0 or somthing like that?
 
Hi

Try this

if (e.Action == TreeViewAction.ByKeyboard || e.Action ==
TreeViewAction.ByMouse)
{
MessageBox.Show(e.Node.Text );//Or code for showing the form.
treeView1.SelectedNode = null;
}

Regards
Sooraj PM
Microsoft Community Star
 
That did not quite work but this one did

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

Thanx for the pointer
 
Hi Vexander. My Name is Iggie

I'm new in vb.net. And I was trying to use the treeview as a menu with no
luck. I saw your msg and I was wonderning if you could help me out to
accomplish this. This is wath I have. How can I tell in my application to
access form1 or form2.

Forms

Form1

Form2

Reports

Report1

Report2

Thanks... Iggie.
 
Back
Top