Wingdings Error - page 2

 
stitchtrader:

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

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

I tried manually and here is result

 

 
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);
  }
 

You're really great! Alain!

It did work! Thank you so much!

Have A Nice Weekend

You Rock (=^^=)

 
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.

 
stitchtrader:

I tried manually and here is result

Is that the correct result ?
 
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
 
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. 

 
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.
 

To get a wingdings code, proceed like this :

string text = CharToString(code);

ObjectSetString(0,name,OBJPROP_TEXT,text);

Reason: