I'm drawing rectangles in a panel starting from the left side.

When I reach the right side of the panel I'd like to shift left the rectangles previously drawn to have the space to draw another one, and so on.

Which is the simplest way to do it?

I'm drawing using **System.Drawings.Graphics**.

I'm using Winforms. The code is:

```
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace FFViewer
{
    public partial class Form1 : Form
    {
        [DllImport("shlwapi.dll")]
        public static extern int ColorHLSToRGB(int H, int L, int S);

        int x=0;
        int y=300;
        int h = 0;

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            panel_Paint();

            x = x + 40;
            h = h + 40;

            if (h >= 240)
                h = 0;
        }

        private void panel_Paint()
        {
            int val;
            Color color;

            val = ColorHLSToRGB(h, 128, 240);

            Graphics g = panel1.CreateGraphics();

            color = ColorTranslator.FromWin32(val);

            SolidBrush sb = new SolidBrush( color );

            g.FillRectangle(sb, x, y, 40, 100);

        }
    }

}

```

So, when I draw the latest rectangle on the right side, I'd like to shift left all the rectangles to leave the space to draw another one on the right side.

P.S. I don't have enough reputation to post images :(