Results 1 to 5 of 5

Thread: Single click select issue in treeview

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2003
    Location
    Amsterdam, The Netherlands
    Posts
    53

    Single click select issue in treeview

    I am having trouble with selecting items in a treeview using single clicks. WhenI ue the double click even it works fine, but when using single clicks the result is always 1 step behind (it's hard to explain this, but I'l try):

    have these items in a treeview:

    70s
    80s
    90s
    00s
    Current

    When I first come to the treeview and select say 90s, instead 70s (the first node) is selected and it's link shown in the listview, if I then click 80s, the 90s contents are shown and so on.. I use this to get the node:

    Dim flpath As String = trvRedCase.SelectedNode.FullPath.ToString

    which works fine with doubleclick, but has the above result with single clicks..

    Anyone got any ideas..???

    I'll just post the whole sub to show you what I am doing:

    Code:
    Private Sub trvRedCase_GetNode(ByVal sender As Object, ByVal _
    e As System.EventArgs) Handles trvRedCase.Click
    
            Dim Splash As New frmSplash
            Splash.splsStatus.Text = "Loading and sorting (sub)Group"
            Splash.splsStatus.Refresh()
            Splash.Show()
    
            Dim flpath As String = trvRedCase.SelectedNode.FullPath.ToString
    
            If flpath = trvRedCase.SelectedNode.ToString.Remove(0, 10) Then
                flgrp = 1
                section = flpath
            Else
                flgrp = 0
                section = flpath.Remove(0, flpath.LastIndexOf("\") + 1)
                flpath = flpath.Substring(0, flpath.LastIndexOf("\"))
            End If
    
            Call FillRedCase(flpath, section)
    
            Splash.Hide()
        End Sub
    Last edited by paulheu; Dec 15th, 2003 at 06:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width