LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

incorrect image indexes when copying tree controls

I am writing a radar test set application with LabWindows.  My application allows the user to select tests from a tree control that uses different icon images to represent the various test types.  When I copy items from one tree control to another, the icon images appear to be copied with them, but if I try to read the ATTR_IMAGE_INDEX attribute of the item in the new control, I get an incorrect value.  For example, I'll get a 12 or 13 even though the control contains only nine images.  Is this a problem with LabWindows?
0 Kudos
Message 1 of 6
(3,549 Views)
Hi Rich,

This is not a known problem.  Are you recursively copying all of the children of the parent?
Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 2 of 6
(3,529 Views)
No, I was copying only the root item.  All the descendents were copied along with it automatically.
0 Kudos
Message 3 of 6
(3,527 Views)
Hi Rich,

What is ATTR_IMAGE_INDEX in the original control?  Also, please let me know if the following KB helps:

KB 2WMBER1W: How Do I Load and Use Custom Symbols for My Tree Control Items?



Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 4 of 6
(3,504 Views)

The image indexes used in the original control range from 0 to 8.  For the particular branch that I was copying, the image index of the parent was 2 and the indexes of the children varied.

The knowledge base item that you sent was for LabView, not LabWindows.  We are not using LabView.

0 Kudos
Message 5 of 6
(3,499 Views)
Hi Rich,

Are you copying a tree into an empty tree?  How many total items are there in the new tree?  How many unique images are there in the new tree?  Is this causing you any problems (if so, what are they?), or are you just reporting a possible bug? 
Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 6 of 6
(3,476 Views)