diff --git a/components/ideintf/objectinspector.pp b/components/ideintf/objectinspector.pp index aa9b79da86..c0482a816b 100644 --- a/components/ideintf/objectinspector.pp +++ b/components/ideintf/objectinspector.pp @@ -2503,6 +2503,9 @@ end; procedure TOICustomPropertyGrid.SetTopY(const NewValue:integer); var NewTopY: integer; + {$IFDEF WINDOWS} + r: Types.TRect; + {$ENDIF} begin NewTopY := TopMax; if NewValue < NewTopY then @@ -2510,10 +2513,14 @@ begin if NewTopY < 0 then NewTopY := 0; if FTopY<>NewTopY then begin + {$IFDEF WINDOWS} + r := ClientRect; + if not ScrollWindowEx(Handle,0,FTopY-NewTopY,@r,@r,0,nil, SW_INVALIDATE+SW_SCROLLCHILDREN) then + {$ENDIF} + Invalidate; FTopY:=NewTopY; UpdateScrollBar; AlignEditComponents; - Invalidate; end; end;