LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find item in TreeView

Hi all,

i'm trying work with TreeView ActiveX control.
I can insert items, expand it and so...
My problem that when i use event NodeClick, the data that it returns is Item Key. But all methods over item get as input parameter Item Index. How can i get Index if i know Item Key?
0 Kudos
Message 1 of 3
(2,711 Views)
Hi,

The Index is a variant. Just attach the Key to the Index. This works. The
component is smart enaugh to understand this (the key is a string, the index
a number, this information is stored in the variant).

I get my Key from the Selected Node property, and this works for me. I
haven't used the NodeClick event, but I guess ut works the same.

Regards,

Wiebe.

"Nadav Chernin" wrote in message
news:5065000000080000007C560000-1027480788000@exchange.ni.com...
> Hi all,
>
> i'm trying work with TreeView ActiveX control.
> I can insert items, expand it and so...
> My problem that when i use event NodeClick, the data that it returns
> is Item Key. But all methods over item get as input parameter Item
> Index. How can i get Index if i know Item Ke
y?
0 Kudos
Message 2 of 3
(2,711 Views)
Hi,

The Index is a variant. Just attach the Key to the Index. This works. The
component is smart enaugh to understand this (the key is a string, the index
a number, this information is stored in the variant).

I get my Key from the Selected Node property, and this works for me. I
haven't used the NodeClick event, but I guess ut works the same.

Regards,

Wiebe.

"Nadav Chernin" wrote in message
news:5065000000080000007C560000-1027480788000@exchange.ni.com...
> Hi all,
>
> i'm trying work with TreeView ActiveX control.
> I can insert items, expand it and so...
> My problem that when i use event NodeClick, the data that it returns
> is Item Key. But all methods over item get as input parameter Item
> Index. How can i get Index if i know Item Ke
y?
0 Kudos
Message 3 of 3
(2,711 Views)