LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

question about ring_ctrl

how can I edit the lable of ring control when my program is
running?for example i want add an item into ringlist,but i do not want
to use the extra string control.
0 Kudos
Message 1 of 3
(3,129 Views)
Hi Tyro,
you're asking about modifying / adding / removing from a ring control which is basically a list of label value pairs. The functions you need are in the User Interface Library -> Controls/Graphs/StripCharts -> List (Label/Value) Controls.

It's use could be something like :

int main (int argc, char *argv[])
{
static int panelHandle;
int i;
char strings[5][10] = {"One","Two","Three","Four","Five"};

if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "ring control.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);

for (i=0;i<5;i++)
InsertListItem (panelHandle, PANEL_RING, -1, strings[i], i);

RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
}


Hope that helps
S.
// it takes almost no time to rate an answer Smiley Wink
Message 2 of 3
(3,129 Views)
dear sir:

thank you for your example!
0 Kudos
Message 3 of 3
(3,129 Views)