Placing OBJ_LABEL on top of OBJ_RECTANGLE_LABEL

 

Hi!

I guess my problem is trivial, yet I failed to google a solution.

I want to create an indicator which display a lot of textual information. The actual chart is unimportant. So I first create a large area covering all the chart:

  ObjectCreate("pi_Gaps",OBJ_RECTANGLE_LABEL,0,0,0);
  ObjectSet("pi_Gaps",OBJPROP_CORNER,CORNER_LEFT_UPPER);
  ObjectSet("pi_Gaps",OBJPROP_XDISTANCE,0);
  ObjectSet("pi_Gaps",OBJPROP_YDISTANCE,0);
  ObjectSet("pi_Gaps",OBJPROP_XSIZE,ChartGetInteger(0,CHART_WIDTH_IN_PIXELS,0));
  ObjectSet("pi_Gaps",OBJPROP_YSIZE,ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,0));
  ObjectSet("pi_Gaps",OBJPROP_BGCOLOR,Black);
  ObjectSet("pi_Gaps",OBJPROP_ZORDER,0);
  ObjectSet("pi_Gaps",OBJPROP_BACK,false);

Then I create an element where I want to put the text:

  ObjectCreate("pi_Pair01",OBJ_LABEL,0,0,0);
  ObjectSet("pi_Pair01",OBJPROP_CORNER,CORNER_LEFT_UPPER);
  ObjectSet("pi_Pair01",OBJPROP_XDISTANCE,10);
  ObjectSet("pi_Pair01",OBJPROP_YDISTANCE,Text_Y_Distance);
  ObjectSet("pi_Pair01",OBJPROP_COLOR,White);
  ObjectSet("pi_Pair01",OBJPROP_ZORDER,100);
  ObjectSet("pi_Pair01",OBJPROP_BACK,false);

If I then put text in that object, it is not visible:

  ObjectSetText("pi_Pair01","Test");

So how do I actually get the text on top of the rectangle? OBJPPROP_ZORDER does not do the trick it seems.

Thanks for your help

pi

 
Boris_pi: So how do I actually get the text on top of the rectangle? OBJPPROP_ZORDER does not do the trick it seems.
  1. Zorder is only about click order (and doesn't work as far as I'm concerned.)
  2. Objects are displayed in the order created (last on top,) since February 3, 2014 (Build 600) See my GUI EA like mine (for MT4): Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 6
 
whroeder1:
  1. Zorder is only about click order (and doesn't work as far as I'm concerned.)
  2. Objects are displayed in the order created (last on top,) since February 3, 2014 (Build 600) See my GUI EA like mine (for MT4): Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 6
Thanks for your reply. I am on build 1090. So 2 should apply. Last on top would mean my text displays on top of the rectangle. It does not though. But why?
 
Now this is weird. After some more changes in the indicator it suddenly works. Nevermind, it would be good to know how to explicitly control it.
Reason: