A button only has one text, so no.
Ahmed_Fouda: is there any way the text in button object can be multicolored ?
You could use a bitmap object as a button, that can have any color you want.
If I am not mistaking, Bitmaps have button properties to be handled like a button. (On/Off)
Dominik Christian Egert #:
You could use a bitmap object as a button, that can have any color you want.
If I am not mistaking, Bitmaps have button properties to be handled like a button. (On/Off)
this
And you can also do this trick
place a bitmap in the background with a gradient
place your button bitmap , same size , on top .
Fill the rectangle with a solid color and then draw a text with opacity 0 .
That will cut a hole in the button where the text is , and let the gradient below show.
Lorentzos Roussos #:
I am sure the OP asking such question will do as you said .
this
And you can also do this trick
place a bitmap in the background with a gradient
place your button bitmap , same size , on top .
Fill the rectangle with a solid color and then draw a text with opacity 0 .
That will cut a hole in the button where the text is , and let the gradient below show.
You also can put text at the front of button. Use one object per each letter.
Ezatrimeo #:
You also can put text at the front of button. Use one object per each letter.
You also can put text at the front of button. Use one object per each letter.
Good idea , but he will have to do extra measuring per letter for that , the width of the letter in pixels.
Documentation on MQL5: Object Functions / TextGetSize
- www.mql5.com
TextGetSize - Object Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
is there any way the text in button object can be multicolored ?
thanks