Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TreeView: Selected items
#1
Hi all
I have a question about the TreeView. How can I declare if nothing is selected in the TreeView.

Thanks in advance
#2
Do you want to clear the current selection? Or check to see if the user is currently selecting something?
My Blog | My Setup | My Videos | Have a wonderful day.
#3
The second one. I want to know if the user selected something.
#4
If you are using .NET 3.0 or above, the following code will work to see if the user is selecting something.

[code2=vbnet]If Not (TreeView1.SelectedItem Is Nothing) Then
MsgBox("The User is not selecting anything!")
End If[/code2]
My Blog | My Setup | My Videos | Have a wonderful day.


Forum Jump:


Users browsing this thread: 1 Guest(s)