Wingdings Error - page 2

To add comments, please log in or register
Simon Gniadkowski
17599
Simon Gniadkowski  
stitchtrader:

I tried creating the Label from Scrpt but it didn't work

Try it manually and report back what you find please . . .
stitchtrader
134
stitchtrader  
RaptorUK:
Try it manually and report back what you find please . . .

I tried manually and here is result

 

Alain Verleyen
36029
Alain Verleyen  
stitchtrader:

I tried creating the Label from Scrpt but it didn't work

It didn't either but your advice was very helpful

Thank you :)


Ok, then try with an ushort and ShortToString, which use Unicode :

input ushort Code = 221;
void OnStart()
  {
   ObjectCreate(0,"TEST",OBJ_LABEL,0,0,0); 
   ObjectSetInteger(0,"TEST",OBJPROP_XDISTANCE,200);
   ObjectSetInteger(0,"TEST",OBJPROP_YDISTANCE,200);
   ObjectSetInteger(0,"TEST",OBJPROP_FONTSIZE,20);
   ObjectSetString (0,"TEST",OBJPROP_FONT,"Wingdings");
   string Icon=ShortToString(Code);
   ObjectSetString (0,"TEST",OBJPROP_TEXT,Icon);
   ObjectSetInteger(0,"TEST",OBJPROP_CORNER,CORNER_RIGHT_LOWER);
   ObjectSetInteger(0,"TEST",OBJPROP_ANCHOR,ANCHOR_RIGHT);
  }
stitchtrader
134
stitchtrader  

You're really great! Alain!

It did work! Thank you so much!

Have A Nice Weekend

You Rock (=^^=)

Alain Verleyen
36029
Alain Verleyen  
stitchtrader:

You're really great! Alain!

It did work! Thank you so much!

Have A Nice Weekend

You Rock (=^^=)

You are kind, but actually I don't understand why ANSI code doesn't work for you and why you have to use Unicode. Maybe your Wingdings font isn't the same as yours ?

Anyway, glad to help you.

Simon Gniadkowski
17599
Simon Gniadkowski  
stitchtrader:

I tried manually and here is result

Is that the correct result ?
Alain Verleyen
36029
Alain Verleyen  
RaptorUK:
Is that the correct result ?

No, it is not, don't you see the 3 characters ?

Indeed, I don't see a way to enter a code (ANSI or UNICODE) for an OBJ_LABEL manually, do you know one ?

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types - Documentation on MQL5
Simon Gniadkowski
17599
Simon Gniadkowski  
angevoyageur:

No, it is not, don't you see the 3 characters ?

Indeed, I don't see a way to enter a code (ANSI or UNICODE) for an OBJ_LABEL manually, do you know one ?

I see the 3 characters,  but I don't know if that is what was intended or not . . .  character 0x32 0x32 and 0x31


I just open up Charmap, select the font, find the character I want and copy and paste it into the Object properties. 

Alain Verleyen
36029
Alain Verleyen  
RaptorUK:

I see the 3 characters,  but I don't know if that is what was intended or not . . .  character 0x32 0x32 and 0x31


I just open up Charmap, select the font, find the character I want and copy and paste it into the Object properties. 

Of course. Thank you.
steve.vanlaer
22
steve.vanlaer  

To get a wingdings code, proceed like this :

string text = CharToString(code);

ObjectSetString(0,name,OBJPROP_TEXT,text);

123
To add comments, please log in or register