Hi,
I followed using EVENT_LEFT_CLICK and EVENT_LEFT_CLICK_UP to light a LED.
But when I press the toggle button, the button did not respond properly. Some lag occur & button only depress when click on its label. Only when double-clicking the button, it will then depress.
switch (event)
{
case EVENT_LEFT_CLICK:
SetCtrlVal(panelHandle, PANEL_LED, 1);
SetCtrlVal(panelHandle, PANEL_TOGGLEBUTTON_2, 1);
break;
case EVENT_LEFT_CLICK_UP:
SetCtrlVal(panelHandle, PANEL_LED, 0);
SetCtrlVal(panelHandle, PANEL_TOGGLEBUTTON_2, 0);
break;
}
return 0;