Results 1 to 3 of 3

Thread: Finding Selected Item with Treeview control

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    94

    Finding Selected Item with Treeview control

    This may be an extremely stupid question but my VB skills are a bit rusty so here goes:

    I have a treeview control and I want to add a child to a node when the user clicks a toolbar button. I will then add a node as a child to the selected item. I figured the SelectedItem method will work great, but how do I determine if any item is selected at all?

    I know I'm gonna feel stupid when I figure this out.

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    to check if something is selected:

    Code:
    if treeview1.selecteditem is nothing then
         'nothing is selected
    else
         'something is selected
    endif

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    94
    That did it, thanks

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