With TWebPageControl (i.e. TPageControl), the SetTabIndex method does not assign the current FTabIndex value to FPrevTabIndex. As a result of this, if one sets a new TabIndex value (directly or via TPageControl.SelectNextPage) then the next TPageControl.HandleDoChange event does not work correctly because it is using an outdated value for FPrevTabIndex.
Here is the current source code:
procedure TPageControl.SetTabIndex(AIndex: integer);
begin
if (FTabIndex <> AIndex) and (AIndex >= 0) then
begin
FTabIndex := AIndex;
DoUpdateList;
end;
end;
I believe the correct code should be:
procedure TPageControl.SetTabIndex(AIndex: integer);
begin
if (FTabIndex <> AIndex) and (AIndex >= 0) then
begin
FPrevTabIndex := FTabIndex;
FTabIndex := AIndex;
DoUpdateList;
end;
end;
Please consider updating TTabsheet as suggested.
Thanks.