From 0eb6275ce0bc8889d901b9d8c978ac6b98c9b450 Mon Sep 17 00:00:00 2001 From: jesus Date: Sat, 16 Feb 2013 19:46:33 +0000 Subject: [PATCH] Ide, fix ObjectInspector scrollbar bug, from Anton with changes, issue #22748 git-svn-id: trunk@40332 - --- ideintf/objectinspector.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ideintf/objectinspector.pp b/ideintf/objectinspector.pp index e96d3c86a8..c4e78c1589 100644 --- a/ideintf/objectinspector.pp +++ b/ideintf/objectinspector.pp @@ -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);