LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Full-Row-Select Tree Item programmatically

Is it possible to select an Item of a tree-control programmatically so the whole row turns blue?? When using the SetActiveTreeItem-Function only a blue frame is drawn around the label of the active item. When clicking with the mouse on an item it works!
0 Kudos
Message 1 of 4
(4,240 Views)
It's actually already doing what you want, you just can't see it because the tree is not the active control. Add a function call SetActiveCtrl to make the tree control the active control and you will see the solid highlight instead of the outline.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 4
(4,238 Views)
Great, this works.  But why did the tree control cease to become the active control with SetActiveTreeItem()?
0 Kudos
Message 3 of 4
(4,075 Views)
Steve,

SetActiveTreeItem should not make the control active. It should only make that item be the active item in the tree.

If you also want to make the tree be the active control in the panel then you need to call SetActiveCtrl, but those are two different things.

Luis
0 Kudos
Message 4 of 4
(4,038 Views)