03-29-2013 02:45 PM
Is this not possible? I've looked at the help for both SetCtrlVal() and SetCtrlAttribute(), and it doesn't look like it can be done. True?
My app has a control button to clear the displayed graph. It would be nice if the function's first action were to set the value of a toggle button to "OFF." Any other way of accomplishing this?
Thanks.
Solved! Go to Solution.
03-29-2013 04:08 PM
Why do you think that ATTR_CTRL_VAL does not work? It does...
03-29-2013 05:58 PM
Well, then I must be forming the call incorrectly. I couldn't find an example using ATTR_CTRL_VAL, so I wrote this:
rc = SetCtrlVal (g_hmainPanel, PANEL_MAIN_TOGGLEBUTTON, ATTR_CTRL_VAL, 0);
And I get the run-time error:
NON-FATAL RUN-TIME ERROR: "cleargraph.c", line 30, col 84, thread id 0x00002EE8: Too many arguments to variable argument function.
So, if the ATTR_CTRL_VAL form of the call doesn't accept any more arguments, how do I inform the command of the state I wish to put the control into?
Thanks.
03-29-2013 06:26 PM
SetCtrlAttribute (,, ATTR_CTRL_VAL, 0);
or
SetCtrlVal (, , 0);
works for me.