Objects creation problem

 

Hi All,

i am creating a table on a chart that uses a "Wingdings" arrow. The simple code below produces an arrow in the label named "arrow" - I want to use OBJ_LABEL because of x,y coords and not time/price.

ObjectCreate("arrow",OBJ_LABEL,0,0,0,0);
ObjectSet("arrow", OBJPROP_XDISTANCE,200);
ObjectSet("arrow", OBJPROP_YDISTANCE,200);
ObjectSetText("arrow",CharToStr(218),14,"Wingdings",Green)

 I would like to be able to write an integer value in the same label space next to the arrow

ObjectSetText("arrow",CharToStr(218)+"2",14,"Wingdings",Green)

This doesn't work of course because it interprets the "2" in "Wingdings" format.

Does anybody know the correct format to be able to do this?

thanks 

 

I don't think this is ideal, using the limited numbers in wingdings

ObjectSetText("arrow",CharToStr(218)+CharToStr(130),14,"Wingdings",Green);
 

As GumRai rightly says, there is no ideal solution. You can't mix fonts within the same object, so your two choices are:

(1) Create two objects; or

(2) Make do with the wingding characters 128-149 

 
GumRai:

I don't think this is ideal, using the limited numbers in wingdings

 

thanks for the reply. I didn't put the full explanation in but I want to put a calculated integer value next to the arrow character - the integer will be calculated by some function so it will change.

I know this can be done by just creating another label space but I'm looking for a neater solution first if it can be done.

 
honest_knave:

As GumRai rightly says, there is no ideal solution. You can't mix fonts within the same object, so your two choices are:

(1) Create two objects; or

(2) Make do with the wingding characters 128-149 

OK thanks - if it can't be done...it can't be done!
Reason: