Gtk2: take care of adjustment max & min value in case of Gtk2WSScrollingWinControl

git-svn-id: trunk@24220 -
This commit is contained in:
zeljko 2010-03-26 13:18:54 +00:00
parent d3f232387d
commit da4ea2af2e

View File

@ -2587,6 +2587,20 @@ begin
else
Msg.Msg := LM_VSCROLL;
if (AWidgetInfo^.LCLObject is TScrollingWinControl) then
begin
{$ifdef OldAutoSize}
MaxValue := ARange^.adjustment^.upper - ARange^.adjustment^.page_size;
{$else}
MaxValue := ARange^.adjustment^.upper;
{$endif}
if (AValue > MaxValue) or (AValue < ARange^.adjustment^.lower) then
begin
Result := not Result;
exit;
end;
end;
with Msg do
begin
Pos := Round(AValue);