LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel + tree control

hi,

i am reading excel range data with the funciton Excel_RangeGetItem() and trying to display the item in a tree structure with InsertTreeItem().below is the excel data with 3 rows and columns and trying to seggregate column1 as parent node and others as child node. i can able to read single column and display into tree but facing problem in concatenating both column say 2 and 3. i am expecting tree structure as shown below. pls anyone help me in this tree controls.

aaa

bbbccc
1123aaa
1234bbb
2345ccc

 

 

tree.jpg

0 Kudos
Message 1 of 5
(3,409 Views)

Hi,

 

What is the problem you face when concatenating the column values?

 

Do you get the columns into buffer after the call to Excel_RangeGetItem?

You can create a new string out of these two column values using formatting functions like Fmt or sprintf.

Here you should be careful about the data type of these cells in columns bbb and ccc

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 5
(3,406 Views)

hi Eren,

 

i got solution with fmt() functions.

 

thanks a lot... ll get back to u if any issues..

0 Kudos
Message 3 of 5
(3,397 Views)

hi..

i am trying to get the selected node value in a tree structure using GetTreeItemAttribute().

as per previous picture, 123aaa is a child node, and if it is selected the text value "123aaa" need to copy in another temp variable.

is this possible with GetTreeItemAttribute() and how??

 

0 Kudos
Message 4 of 5
(3,388 Views)

You can use GetTreeItemAttribute for that purpose.

The attribute for getting the label text is ATTR_LABEL_TEXT. 

 

Beware that, node value and node label text are different properties.

Node value is something you can assign independent of node label.

S. Eren BALCI
IMESTEK
0 Kudos
Message 5 of 5
(3,383 Views)