Download MetaTrader 5

Although I have disabled a CheckBox it works

To add comments, please log in or register
Write articles and earn money. We pay 200 USD for them!
thakas
26
thakas 2014.09.02 11:58 

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 2016.10.27 07:43  
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 2016.10.27 08:07  
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