05-03-2006 06:20 AM
05-03-2006 06:41 AM
Hello,
If I understand your question correctly, you want to know how to disable a button, without making it invisible to the user. To do so, use the SetCtrlAttribute function.
To disable the button: SetCtrlAttribute (panel, button_ctrl, ATTR_ENABLED, 0);
To enable the button: SetCtrlAttribute (panel, button_ctrl, ATTR_ENABLED, 1);
You can use the ATTR_ENABLED attribute for almost any control type.
05-03-2006 08:27 AM
ATTR_ENABLED refers to timers only, disabling them and stopping the callback.
You should be using ATTR_DIMMED
05-03-2006 03:56 PM
The simplest way is to use SetInputMode (panel, control, mode);
Setting mode = 0 will disable the button and grey it out (the same as SetCtrlAttribute with attribute ATTR_DIMMED and value 1); setting mode =1 qill enable the button.