mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-22 22:48:40 +02:00
Ide, fix ObjectInspector scrollbar bug, from Anton with changes, issue #22748
git-svn-id: trunk@40332 -
This commit is contained in:
parent
7a461e151b
commit
0eb6275ce0
@ -971,16 +971,18 @@ end;
|
||||
procedure TOICustomPropertyGrid.UpdateScrollBar;
|
||||
var
|
||||
ScrollInfo: TScrollInfo;
|
||||
ATopMax: Integer;
|
||||
begin
|
||||
if HandleAllocated then begin
|
||||
ATopMax := TopMax;
|
||||
ScrollInfo.cbSize := SizeOf(ScrollInfo);
|
||||
ScrollInfo.fMask := SIF_ALL or SIF_DISABLENOSCROLL;
|
||||
ScrollInfo.nMin := 0;
|
||||
ScrollInfo.nTrackPos := 0;
|
||||
ScrollInfo.nMax := TopMax+ClientHeight-1;
|
||||
ScrollInfo.nMax := ATopMax+ClientHeight-1;
|
||||
ScrollInfo.nPage := ClientHeight;
|
||||
if ScrollInfo.nPage<1 then ScrollInfo.nPage:=1;
|
||||
if TopY > ScrollInfo.nMax then TopY:=ScrollInfo.nMax;
|
||||
if TopY > ATopMax then TopY:=ATopMax;
|
||||
ScrollInfo.nPos := TopY;
|
||||
ShowScrollBar(Handle, SB_VERT, True);
|
||||
SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
|
||||
|
Loading…
Reference in New Issue
Block a user