If you change the top of the panel the order of visually panel change.
Try this (all the panels aligned altop and with the same Height):
PANEL0
PANEL1
PANEL2
PANEL3
PANEL4
At OnClick event of all panels do this:
TPanel(Sender).Top := TPanel(Sender).Top - TPanel(Sender).Height - 2;
If you click on a panel it moves up one position.
That's the idea. Change the Top X pixels.
At the same, if you do this:
TPanel(Sender).Top := TPanel(Sender).Top - (TPanel(Sender).Height * 2)- 2;
The panel up 2 positions.
ADDED: If you use Drag&Drop, this events return the position (X and Y); With the original position and end position you can calculate the wew top for asign to the panel.
Excuse form my poor english.
regards