From 326bf8d567a8055bf9c7159e60b56ae2b583e98c Mon Sep 17 00:00:00 2001 From: juha Date: Fri, 20 Mar 2015 17:07:52 +0000 Subject: [PATCH] Object Inspector: Improve scrolling, reduce flicker. Issue #27667. git-svn-id: trunk@48433 - --- components/ideintf/objectinspector.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/ideintf/objectinspector.pp b/components/ideintf/objectinspector.pp index aa9b79da86..10acf48eb0 100644 --- a/components/ideintf/objectinspector.pp +++ b/components/ideintf/objectinspector.pp @@ -2503,6 +2503,7 @@ end; procedure TOICustomPropertyGrid.SetTopY(const NewValue:integer); var NewTopY: integer; + r: Types.TRect; begin NewTopY := TopMax; if NewValue < NewTopY then @@ -2510,10 +2511,12 @@ begin if NewTopY < 0 then NewTopY := 0; if FTopY<>NewTopY then begin + r := ClientRect; + if not ScrollWindowEx(Handle,0,FTopY-NewTopY,@r,@r,0,nil, SW_INVALIDATE+SW_SCROLLCHILDREN) then + Invalidate; FTopY:=NewTopY; UpdateScrollBar; AlignEditComponents; - Invalidate; end; end;