06-03-2017 06:59 PM
Hello,
I have a question on how to do it. Initially my toggle button is dimmed and when I received a signal from PLC my toggle button must be active or undimmed.
Thanks in advanced.
Solved! Go to Solution.
06-04-2017 01:56 AM
Use SetInputMode to dim or undim a control
06-04-2017 05:26 AM
or, in the UI editor, change the setting of the checkbox ;Initially dimmed'
06-06-2017 10:49 AM
Hello,
Actually I set-up the button like that what I want to know is If I received a input signal from PLC the button should be dimmed or unclickable.
int CVICALLBACK Standard (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
GetBitFestoInputs /* if I received signal from PLC (true) the button below would dimmed*/
/* Dim the STD button and activate the PREM button */
SetCtrlAttribute (panelHandle, PANEL_STD, ATTR_DIMMED, 1);
SetCtrlAttribute (panelHandle, PANEL_PREM, ATTR_DIMMED, 0);
break;
}
return 0;
}
06-06-2017 05:06 PM
Yes, that should work. Do you have any problem with that?
06-07-2017 09:07 AM
Thanks it works.