Controls EVENT_SORT and tree

Hello

I have a question about how sorting works with tree controls.  Basically, it seems that when this event is fired in the callback, the elements in the tree of have not yet been sorted (as seen by calling GetValueFromIndex (...) on the elements in the tree).  I guess, looking in the help file and the example treeevent, that he is here so that I can "swallow" an event to sort based on the sorting parameters, which are accessible via the eventData parameter.  This seems reasonable.  However, it seems that the EVENT_SORT is the last event raised when the user makes a selection.  So my question is, is it possible to trigger an event after the tree has been sorted in the recall, something like an EVENT_WAS_SORTED?  (I could probably hack something with a global and a timer or something like that, but is there something more intelligent, that I am missing?)  Thank you.

The best way I can think to do would be to call PostDefferedCall from the EVENT_SORT event.  We document that the tree will be sorted forward future events are managed, but in all my tests, this happened to be the case.  I have attached the simple test program to test this point, I wrote.

NickB

National Instruments

Tags: NI Software

Similar Questions

Maybe you are looking for