mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 09:19:40 +02:00
LCL: return correct value from TPageControl.TabIndexAtClientPos also when TabVisible=False. Issue #21088
git-svn-id: trunk@34741 -
This commit is contained in:
parent
fd3ef18dd3
commit
43788346d6
@ -307,9 +307,21 @@ end;
|
||||
NoteBook1.ScreenToClient(Mouse.CursorPos));
|
||||
------------------------------------------------------------------------------}
|
||||
function TCustomTabControl.TabIndexAtClientPos(ClientPos: TPoint): integer;
|
||||
var
|
||||
i, VisiblePageInd: Integer;
|
||||
begin
|
||||
if HandleAllocated then
|
||||
Result:=TWSCustomTabControlClass(WidgetSetClass).GetTabIndexAtPos(Self, ClientPos)
|
||||
if HandleAllocated then begin
|
||||
Result:=TWSCustomTabControlClass(WidgetSetClass).GetTabIndexAtPos(Self, ClientPos);
|
||||
VisiblePageInd:=-1;
|
||||
for i:=0 to PageCount-1 do begin
|
||||
if Page[i].TabVisible then
|
||||
Inc(VisiblePageInd)
|
||||
else begin
|
||||
if VisiblePageInd < Result then
|
||||
Inc(Result);
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Result:=-1;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user