LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to programlly change all indexs value of ring in all panels

hi everyone:
I want to programlly change all indexs value of ring in all panels.
0 Kudos
Message 1 of 2
(2,808 Views)
The index of an element of a ring depends on its position inside the ring itself and cannot be set alone to alter the index of an element, you must retrieve its label and value (GetLabelFromIndex / GetValueFromIndex), delete it from the ring control (DeleteListItem) and reinsert it in the control at the appropriate index position (InsertListItem). If you need to accomplish it an all alaments of a ring, the easier way is probably to create a list in memory (see List function in the Programmer's toolbox), retrieve all elements of the ring in the list, arrange the list order, delete all existing items from the ring control (ClearListCtrl) and then populate the ring taking the elements from the in-memory list in the correct order.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(2,796 Views)