I have a panel with 5 pictures. I'd like to know how can I change the order of my pictures on the panel?
I am posting with this thread a source made in Delphi XE4 with 5 pictures, there is a function
on it to realign all the pictures on the panel.
pic1 pic2 pic3 pic4 pic5
When I click the left mouse button on the pic5 and I drag it where is the pic1, I want to insert it exact the place where is the pic1, then the pictures will be on this sequence:
pic5 pic1 pic2 pic3 pic4
I tried insert this code:
procedure TForm1.Panel3DragDrop(Sender, Source: TObject; X, Y: Integer);
if (Source is TImage) then
TImage(Source).Left := x
AlignImages(Panel3, TImage(Source).Width, 15);
How can I do that?
I can change the image, but I notice that the function AlignImages doesn't allow reorder and it always put the image in the same order.