On Fri, 01 Sep 2006 09:21:46 +0200
Micha Nelissen <[EMAIL PROTECTED]> wrote:
> Flávio Etrusco wrote:
> >> > TForm already has almost the same behaviour as if it inherited
> >> > from TCustomControl, so we're losing nothing from it.
> >>
> >> TCustomControl exposes its canvas while TCustomForm doesn't, IIRC ?
> >
> > It does. Remember, TForm even has OnPaint event ;-)
>
> Hmm, just looked, TScrollingWinControl already has public Canvas. I
> guess functionality wise it makes sense to descend Scrolling from
> Custom. I'm just not happy with the names, I guess. Wouldn't
> TCanvasWinControl (or so) be more appropriate ? TCustomControl could
> be an alias for this.
>
> BTW: Why do you need UpdateScrollBars to be public in TCustomControl ?
TScrollingWinControl is ancestor of TScrollBox, TCustomFrame,
TCustomForm.
TCustomControl is ancestor of 14 classes in the VCL and 18 in Lazarus.
Most TCustomControl do not need scrollbars.
TCustomControl is a very basic TWinControl, with very little overhead
and therefore the preferred ancestor for self painted controls with
own Handle. It is already used that way, and for Delphi compatibility
should be kept that simple.
About the name of TScrollingWinControl:
The VCL version does not provide a canvas. That's an LCL special.
We could derive TScrollingWinControl from TCustomControl to save
some lines of code.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives