background color of rectangle not working

 


this the code below, the rectangle showing but background color does not show

ObjectCreate(0,"RECTANGLE_LABEL",OBJ_RECTANGLE,0, x, fromRange, x2, toRange);
ObjectSetInteger(0,"RECTANGLE_LABEL",OBJPROP_COLOR,clrYellow);
ObjectSetInteger(0,"RECTANGLE_LABEL",OBJPROP_BGCOLOR, clrRed);
ObjectSetInteger(0,"RECTANGLE_LABEL",OBJPROP_STYLE,STYLE_SOLID);

 

Improperly formatted code edited by moderator. Please always use the CODE button (Alt-S) when inserting code.

Code button in editor

 
ansar9h:


this the code below, the rectangle showing but background color does not show


ObjectSetInteger(0,"RECTANGLE_LABEL",OBJPROP_COLOR,true);
 
Alain Verleyen #:
ObjectSetInteger(0,"RECTANGLE_LABEL",OBJPROP_COLOR,true);

can't see rectangle anymore if i add this line

 
ansar9h #:

can't see rectangle anymore if i add this line

Sorry it was a typo.

ObjectSetInteger(0,"RECTANGLE_LABEL",OBJPROP_FILL,true);
 
working thx