How to fix hundredths in CEdit?

 

I have a object CEdit and i can writte (by handle in MT4) number type double (for example 0.01).

When I rewrite the number, for example to 1, only the number 1 remains in the CEdit field, but I need 1.00 to remain there (with preserved hundredths).
Can it be fixed so that hundreds of automatically remain in the field even if I rewrite it to any number?

I tried it over NormalizeDouble, but every time I rewrite the field by hand, the dot, tenths and hundredths disappear, it should work, but I don't know how, please advise me.

Thanks

JB

Documentation on MQL5: Standard Library / Panels and Dialogs / CEdit
Documentation on MQL5: Standard Library / Panels and Dialogs / CEdit
  • www.mql5.com
CEdit - Panels and Dialogs - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Jan Naj:

I have a object CEdit and i can writte (by handle in MT4) number type double (for example 0.01).

When I rewrite the number, for example to 1, only the number 1 remains in the CEdit field, but I need 1.00 to remain there (with preserved hundredths).
Can it be fixed so that hundreds of automatically remain in the field even if I rewrite it to any number?

I tried it over NormalizeDouble, but every time I rewrite the field by hand, the dot, tenths and hundredths disappear, it should work, but I don't know how, please advise me.

Thanks

JB


You should be able to use

DoubleToString(double, 2);
 
Alexander Martinez #:


You should be able to use

Yes, that's what I was looking for.

Thank you very much.

Reason: