Awkward: Thanks for the suggestion! It turns out that the PageIndex property on the TabSheet works. It's important to note that it works like a move and not like a swap:
//This code will NOT work. Swapping the indices returns you to the starting configuration.
Procedure TMyClass.SwapPages(const Index1, Index2: Integer);
var anIndex : integer;
begin
with PageControl do
begin
anIndex := Pages[Index1].PageIndex;
Pages[Index1].PageIndex := Pages[Index2].PageIndex;
Pages[Index2].PageIndex := anIndex;
end;
end;
This is the correct code:
//This code works.
Procedure TMyClass.SwapPages(const Index1, Index2: Integer);
var anIndex : integer;
begin
with PageControl do
begin
anIndex := Pages[Index1].PageIndex;
//Pages[Index1].PageIndex := Pages[Index2].PageIndex;
Pages[Index2].PageIndex := anIndex;
end;
end;
mtrSoft: Thanks for the suggestion. I switched the PageControl to the ExtendedNoteBook without a problem. If someone else wants to rely on this feature, don't forget to set TabDragMode and TabDragAcceptMode to dmAutomatic for the drag and drop to be initiated via the mouse.
Thanks, guys! That was great.