LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get displayed text of an item inside the TreeView Control

Sure thing becktho. Thanks for the fast reply!

 

I am attaching a VI that demonstrates both the problem and the workaround that I've made. It turns out that my original idea for combining the tag with the data does actually work as long as I don't need random access to the tree (traversals are possible).

 

In the attached code, the top section adds two items from which only the tags can be read (not the visible text "Left Cell String").

The bottom section does the same sequence, but appends some example data (a 2d-array of strings) to the tag. Then it parses the data from the tag when traversing the tree.

 

Hopefully I've just missed something and there is actually a way to retrieve data from the "Left Cell String" field. If not, I'll just stick with the workaround for now so I can keep using native LabVIEW controls.

0 Kudos
Message 21 of 28
(949 Views)

Hi

 

I modified you vi just a little bit (see block diagram, where I added a comment). Is this what you are looking for?

 

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 22 of 28
(931 Views)
Sorry I should have told you I'm using 7.1. Could you describe the change or post a 7.1 file? Many thanks for trying to help me out.
0 Kudos
Message 23 of 28
(929 Views)

Have a look at this picture - it's all I've done.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 24 of 28
(927 Views)

Interesting! That looks like it would work.... however I couldn't find it. Perhaps this is a bug/feature that was fixed from 7.1 to 8?

 

I have attached a jpg of the exact property I chose as well as the vi that tries to imitate what you did. The best I could find was "active cell properties: string" which has no tag input. Also, I guess it depends on a user interface click to set an active cell since I always get a blank string from the result.

 

Then the new questions are:

1) Did I choose the same property you did?

2) Did you do something to "activate" the cell or do you know of a way?

 

Continued thanks for your help.

Download All
0 Kudos
Message 25 of 28
(916 Views)

Perhaps this is a bug/feature that was fixed from 7.1 to 8?

Yes that might be possible.

Anyway - the property "ActiveItem Tag" shuld be located under the "Active Item Properties" (according to your screenshot).

Basically the process is like this:

1. Set the active Item by using the "ActiveItem Tag"-property

2. Read the cell string using the "Active Cell String"-property

 

As I do not have access to LV7.1, we obviously have to use pictures....

 

To make a long story short: Have a look at the "Active Item Properties"-submenu to find the tag-property.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 26 of 28
(911 Views)

That was it becktho. When I saw the "Active Item Tag" I only thought of it as a read instead of a write. So now I set the active item with that as a write property and then the read (seems different in 7.1 and 😎 works with that active item.

 

Many thanks becktho for sticking with me until it worked. Now I can get to the business of using this tree for my algorithm.

0 Kudos
Message 27 of 28
(898 Views)

You're welcome. It's alway a pleasure if one could help another LV-user.

 

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 28 of 28
(896 Views)