Did you mean something like this?
procedure TForm1.DrawRectangles;
var
X, Y, Size: Integer;
begin
Y := 100;
Size := 15;
X := 60
Canvas.Pen.Color := clYellow;
Canvas.Rectangle(X, Y, X+Size, Y+Size);
X := 80
Canvas.Pen.Color := clGreen;
Canvas.Rectangle(X, Y, X+Size, Y+Size);
X := 100
Canvas.Pen.Color := clRed;
Canvas.Rectangle(X, Y, X+Size, Y+Size);
X := 120
Canvas.Pen.Color := clBlue;
Canvas.Rectangle(X, Y, X+Size, Y+Size);
end;
Please provide more information? Or not much we can help.
Umm instead of putting number like 60, 80, 100, 120, i want to put the first value + x. for example, let's say 60 is the first value, and the second value should be first value + x and the third value should be second value + x. Thank you