<< Click to display table of contents >> TSRVTabSet.OnMoveTab |
Occurs when two tabs exchange their places as a result of tab moving.
type
TSRVTabMoveEvent = procedure(Sender: TSRVTabSet; NewTabIndex, OldTabIndex : Integer) of object;
property OnTabMove: TSRVTabMoveEvent;
NewTabIndex, OldTabIndex – indexes of exchanged tabs (in the Tabs collection).
(this event can be interpreted as moving a tab from OldTabIndex to NewTabIndex position; but since this event occurs only for adjacent tabs, it is convenient to think about it as about exchanging places).
This event occurs only when tab rearranging is allowed, see CanMoveTabs property.
Example
Assuming that each tab corresponds to one item in Editors array. When moving tabs, we need to update this array:
procedure TForm3.SRVTabSet1TabMove(Sender: TSRVTabSet; NewTabIndex,
OldTabIndex: Integer);
var
tmp: TSRichViewEdit;
begin
tmp := Editors[OldTabIndex];
Editors[OldTabIndex] := Editors[NewTabIndex];
Editors[NewTabIndex] := tmp;
end;