LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree Attribute

How can I uncheck all checked data of a tree? The tree has the ATTR_SHOW_MARKS attribute setted;

Is it possible to do it with a simple command?

Thank you in advance.


Message Edited by Oliveira on 09-26-2007 03:18 PM

0 Kudos
Message 1 of 4
(3,303 Views)

Not as far as I am aware. I use code like:

    int nItems, indx;
    
    GetNumListItems(pMain,MAIN_DATASETS,&nItems);
    for (indx=0;indx<nItems;indx++)
     SetTreeItemAttribute(pMain,MAIN_DATASETS,indx,ATTR_MARK_STATE,VAL_MARK_OFF);

but if anyone has a better solution I'd like to see it.

--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 4
(3,283 Views)
Martin,

You don't have to iterate through all the items. The SetTreeItemAttribute function allows you to pass VAL_ALL_OBJECTS as the index.

Luis
Message 3 of 4
(3,278 Views)

That's handy 🙂

Thanks for the tip.

--
Martin
Certified CVI Developer
0 Kudos
Message 4 of 4
(3,254 Views)