Hans-Peter Diettrich <[email protected]> hat am 7. Oktober 2011 um 13:33
geschrieben:

> Mattias Gaertner schrieb:
>
> > ClientRect Left,Top is 0,0, so Right=ClientWidth and Bottom=ClientHeight.
>
> What about the determination of the ScrollOffset:
>
> function TScrollingWinControl.GetClientScrollOffset: TPoint;
> begin
>    if (HorzScrollBar <> nil) and (VertScrollBar <> nil) then
>    begin
>      Result.X := HorzScrollBar.Position;
>      Result.Y := VertScrollBar.Position;
>    end else
>    begin
>      Result.X := 0;
>      Result.Y := 0;
>    end;
> end;
>
> Does a scrolling control really *always* have two or zero scrollbars? 
Yes.
During Creation and Destruction they may have less than two. 
They have a Visible property. 
 

> If so, a check of only one scrollbar would be sufficient,
> otherwise every scrollbar must be checked individually! 
Mattias
 
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to