Although I have disabled a CheckBox it works

To add comments, please log in or register
thakas
16
thakas  

Hi,

Under some conditions, I want to disable a CheckBox. So I use the following code:

CCheckBox checkbox;

checkbox.Disable() ;

I have tried also this:

checkbox.Deactivate(); 

but the checkbox still be Active and the user can check/uncheck it.

Is it a bug of MT4 or my code is wrong?

thanks

erne100
6
erne100  
The same here! I cannot disable Edit Control. Tried Disable() and Deactivate() and the control is still active and user can write into it.
erne100
6
erne100  
I've finally found the solution. At least for the edit control. You need to use ReadOnly() method instead of Disable() or Deactivate(). Additionally you can change the background color of the control by using ColorBackground() method.
To add comments, please log in or register