Add horizontal and vertial lines to separate objects - page 2

 

Hello again,

I am re-visiting this thread. Can someone help me work out why my 4 panel is created and then deleted by the next panel.

void ObjectBuild()
  {
   string Build[]={"Build0","Build1","Build2","Build3","Build4","Build4","Build6","Build7","Build8","Build9"};
   int NewPanel=0;
   int D_X[]={0  ,623,1242  ,0  ,623,1242  ,0   ,623,1242};
   int D_Y[]={0  ,0  ,0     ,343,343,343   ,685 ,685,685};
   int X[]  ={623,623,623   ,623,623,623   ,623 ,623,623};
   int Y[]  ={343,343,343   ,343,343,343   ,343 ,343,343};
  
   for(int SHIFT=0; SHIFT<=10; SHIFT++){NewPanel++; if(NewPanel>=10) break;

      ObjectCreate(0,Build[NewPanel],OBJ_RECTANGLE_LABEL,0,0,0);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_XDISTANCE,D_X[SHIFT]);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_YDISTANCE,D_Y[SHIFT]);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_XSIZE,X[SHIFT]);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_YSIZE,Y[SHIFT]);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_BORDER_TYPE,BORDER_FLAT);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_BGCOLOR,clrBlue);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_COLOR,clrWhite);
      ObjectSetInteger(0,Build[NewPanel],OBJPROP_SELECTABLE,false);
     }
  }
 

I worked it out.

,"Build3","Build4","Build4",


Silly mistake.
Reason: