LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get displayed text of an item inside the TreeView Control

Hi,

i will try to explain my problem with an example:

items to add:                         dispalyed items:

string                                

number

string

0 Kudos
Message 11 of 28
(938 Views)

Hi,

i will try to explain my problem with an example:

items to add:                         dispalyed items:

string                                 

number

string

0 Kudos
Message 12 of 28
(938 Views)

Hi,

i will try to explain my problem with an example:

items to add:                         dispalyed items:

string                                  

number

string

0 Kudos
Message 13 of 28
(938 Views)

Hi,

i will try to explain my problem with an example:

items to add:                         dispalyed items:

string                                   

number

string

0 Kudos
Message 14 of 28
(938 Views)

Hi,

i will try to explain my problem with an example:

items to add:                         dispalyed items:

string                                    

number

string

0 Kudos
Message 15 of 28
(938 Views)

Hi,

my problem is that the 'left cell string' property which contains the displayed string is only a writeable one in case of adding new items. If this would be readable by any method using the tag of the selected item as an input there would be no problem!

My solution is adding a specified separator and know i'm able to generate the displayed string be reducing the tag of the selected item. 

Example:

string to display:                           tag with old solution:

String                                             

String   

0 Kudos
Message 16 of 28
(938 Views)

Hi,

since i generate a separator to create the tag there is no more problem to separate the displayed string from the automatically added info to create unique tags. Now the underscore '_' can be used within the names of my item strings and i'm always able to generate the displyed string by extracting it from the tag of the selected item!

The problem wouldn't exist if the 'left cell string' could be read as property with any method using the tag as an input paramter!

Regards,

Sunny

 

0 Kudos
Message 17 of 28
(938 Views)

I know this is an old thread, but I am having the same problem still so I will try to rephrase Sunny's problem and workaround as clearly as possible in case someone knows a solution.

 

 In my case, I'm using the LabVIEW tree control not for directories but as a data structure. In the tree control, there are two main parts to each node for the purposes of this problem. One is the tag and one is the "Left Cell String".

 

The tag seems to be meant as a unique identifier. The "Left Cell String" seems to be what is displayed in the control.

 

Creating a new item and setting those two values is no problem. However, with the methods and properties available for the control, it only seems possible to read the tag back. I could find no way to read back the "Left Cell String".

 

Therefore what Sunny has done and I am doing is to create a unique tag and then append the tag with the data that we intended to store in the "Left Cell String". Then when reading the tag, we parse it to remove the unique id part and leave the real data.

 

Does anyone know what we are doing wrong or if there really is just no way to read back "Left Cell String"? Sunny, sorry if I've misunderstood or misstated your situation.

0 Kudos
Message 18 of 28
(695 Views)

I definitely didn't think enough about the workaround so what I wrote for a workaround won't work directly. It would need storage elsewhere of the matchup between the tag and the data (i.e. a table or database).

 

However, the original problem is still the same for me. Does anyone know a way to get that stored text/data from the tree control? I am still only able to access the tags.

0 Kudos
Message 19 of 28
(693 Views)

Hi

 

Could you post the vis in which you want to access the data? Maybe with some sample data?

 

And last but not least - please in LV8.0, as I'm still using this version.

 

Thomas

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