Download MetaTrader 5
To add comments, please log in or register
Publish your programs in the Market. Make money with your knowledge!
Hai Nguyen
116
Hai Nguyen 2014.03.11 19:31 

Hello everyone,

I am trying to set font style for an object label like italic? I found TextSetFont() function, but not sure how to use it with OBJ_LABEL.

Thank you in advance.

whroeder1
13602
whroeder1 2014.03.11 20:02  
OBJ_LABEL - MQL4 Documentation
contains:
input string            InpFont="Arial";         // Font
Try reading it.
Alain Verleyen
Moderator
28542
Alain Verleyen 2014.03.11 20:38  
aquarchitecture:



Thank for getting back to me. Actually, I did read this page; however I could not find any helpful information for my problem. Can you be more specific which lines could help me to solve the problem?


//--- set text font
   ObjectSetString(chart_ID,name,OBJPROP_FONT,font);
Keith Watford
Moderator
7899
Keith Watford 2014.03.12 02:15  
aquarchitecture:

Hello everyone,

I am trying to set font style for an object label like italic? I found TextSetFont() function, but not sure how to use it with OBJ_LABEL.

Thank you in advance.


Had a look and it seems that TextSetFont() doesn't work

I cannot see any other way in the documentation to do what you want. :(

Alain Verleyen
Moderator
28542
Alain Verleyen 2014.03.12 08:12  
GumRai:


Had a look and it seems that TextSetFont() doesn't work

I cannot see any other way in the documentation to do what you want. :(

He can do what he wants with an italic font. There is no "style" for font in MT4.
JPS1
239
JPS1 2014.03.12 09:28  
angevoyageur:
He can do what he wants with an italic font. There is no "style" for font in MT4.

Op is looking for example code to make a font appear in its italic state. He calls it style, well because MetaTrader documentation is calling it a style too.

https://docs.mql4.com/objects/textsetfont

fontstyle

I would help, but I tried and can't get it to work either.

Alain Verleyen
Moderator
28542
Alain Verleyen 2014.03.12 11:12  
JPS:

Op is looking for example code to make a font appear in its italic state. He calls it style, well because MetaTrader documentation is calling it a style too.

https://docs.mql4.com/objects/textsetfont

I would help, but I tried and can't get it to work either.



Ok, it seems you are right, but I can't find a way to use that with a OBJ_LABEL.
/
To add comments, please log in or register