01-17-2013 01:50 AM
In panel.uir, I design an numeric initional control mode as INDICATOR, then i change it's control mode to be HOT in my panel.c ,but the numeric is still unacceptible.
SetCtrlAttribute(systemp2,SEQUINTERVAL,ATTR_CTRL_MODE,VAL_HOT);
SetCtrlAttribute(systemp2,RBINTERVAL,ATTR_CTRL_MODE,VAL_HOT);
GetCtrlVal(systemp2,SEQUINTERVAL,&val);
GetCtrlVal(systemp2,RBINTERVAL,&rbl);
both of the values of val and rbl are zero.
so how to change the indicator mode to be hot mode in the program?
Solved! Go to Solution.
01-17-2013 04:27 AM
Hi,
did you check the return value of SetCtrlAttribute to see if the function call was successful? I noticed some non-printable character between M and O in your ATTR_CTRL_MODE, so maybe the function simply doesn't understand the argument?
01-17-2013 05:33 AM - edited 01-17-2013 05:33 AM
Additionally, SEQUINTERVAL is not in the form PANEL_CONTROLID required by the function so unless it is a variable where you store the correct valua, the function could be unable to translate it in the correct control id. Again, reading SetCtrlAttribute return code should evidence an error in the command. The same applies to RBINTERVAL.