TreeView Plus Sign to Select Node?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • B-Dog

    TreeView Plus Sign to Select Node?

    I was trying to use the treeview and was wondering if there was a way to
    make the treeview select the node when you click the plus sign next to it.
    The only way I've found to do it is to actually click on the node name and
    then it will show it selected. I'd like to change to selected when you
    click the plus sign. Is this possible. Thanks


  • Herfried K. Wagner [MVP]

    #2
    Re: TreeView Plus Sign to Select Node?

    "B-Dog" <bdog4@hotmail. com> schrieb:[color=blue]
    >I was trying to use the treeview and was wondering if there was a way to
    > make the treeview select the node when you click the plus sign next to it.
    > The only way I've found to do it is to actually click on the node name and
    > then it will show it selected. I'd like to change to selected when you
    > click the plus sign.[/color]

    \\\
    Private Sub TreeView1_Expan dOrCollapse( _
    ByVal sender As Object, _
    ByVal e As TreeViewEventAr gs _
    ) Handles TreeView1.After Collapse, TreeView1.After Expand
    Me.TreeView1.Se lectedNode = e.Node
    End Sub
    ///

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • B-Dog

      #3
      Re: TreeView Plus Sign to Select Node?

      Thanks, will try that!

      Barclay

      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
      news:u8B8mLmVFH A.1152@tk2msftn gp13.phx.gbl...[color=blue]
      > "B-Dog" <bdog4@hotmail. com> schrieb:[color=green]
      > >I was trying to use the treeview and was wondering if there was a way to
      > > make the treeview select the node when you click the plus sign next to[/color][/color]
      it.[color=blue][color=green]
      > > The only way I've found to do it is to actually click on the node name[/color][/color]
      and[color=blue][color=green]
      > > then it will show it selected. I'd like to change to selected when you
      > > click the plus sign.[/color]
      >
      > \\\
      > Private Sub TreeView1_Expan dOrCollapse( _
      > ByVal sender As Object, _
      > ByVal e As TreeViewEventAr gs _
      > ) Handles TreeView1.After Collapse, TreeView1.After Expand
      > Me.TreeView1.Se lectedNode = e.Node
      > End Sub
      > ///
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>
      >[/color]



      Comment

      Working...