At last I understand, I'm a bad student.
So I have to use the NAME property instead of the text displayed in the treeview
Now it's working with only one line instead of ten.
Thank you VERY much John
I have no choice because I can't get the method FIND to work
it gives me the error "Index out of range"
I spent hours trying to figure out what is wrong with it
I found various examples on the net that I tried, same thing, same error
Maybe it's a problem of version ! I have Visual Studio 2010...
I used your code sample in a new Form with a TreeView named TreeView1 and a button named button1
So here's what it looks like:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Me.TreeView1.SelectedNode =...
Thank you for your answer
I already used the FIND method in several ways but it works only with the first level nodes, (True as second parameter)
if I try with a ChildNode I have the error "Index out of range exception"
I don't know why and what I should do
Can you please enlighten me. Thank you.
After long hours of search I found a quite good example
There may be something simpler but this one is not bad
The idea is to browse nodes in a RECURSIVE manner
Here's a very simple example:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load...
Hi,
I have a TreeView with [C:] drive folders hierarchy
How can I make the TreeView expand to DESKTOP folder by code at Form Load
Thank you for your help
Thank you John for your answer
I've come across a good idea on the internet : Using ListViews instead of ListBoxes.
A ListView offers a more normal behavior in a Drag operation. Multiple items can be selected and dragged normally.
For anyone who would like to learn about it, take a look at a...
Hi,
I've looked everywhere on the internet for multiple items drag&drop between listboxes and found only examples showing single item drag.
I know how to make a single item dragdrop operation between two listboxes using MouseDown, DoDragDrop, DragEnter, DragDrop
Now what I'm looking forward to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.