On Fri, 01 Sep 2006 11:25:39 +0200
Micha Nelissen <[EMAIL PROTECTED]> wrote:
> Mattias Gaertner wrote:
> > About the name of TScrollingWinControl:
> > The VCL version does not provide a canvas. That's an LCL special.
>
> Ah, that explains.
>
> > We could derive TScrollingWinControl from TCustomControl to save
> > some lines of code.
>
> Initial patch seems to do that, but I still am not sure about the use
> of moving that scrollbar code.
Don't know. Flavio is right, that at the moment only
TScrollingWinControl uses TControlScrollBar and so the code *could* be
moved to save a 'with'. Is there another gain?
There are some ToDos in the patch:
//todo: why doesn't it simply use ClientWidth/Height?
// page
HorzScrollbar.FPage := Min(ClientWidth -1,High(HorzScrollbar.FPage));
VertScrollbar.FPage := Min(ClientHeight-1,High(VertScrollbar.FPage));
Answer: HorzScrollbar.FPage is not integer.
//todo: rename to IsScrollbarsStored
Function StoreScrollBars : Boolean;
Both are good names. The Isxxx is more Delphi like. Just rename or
keep it. It is a private function anyway. Don't add such
todos.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives