On Wed, 22 Jul 2009 09:21:04 -0700 (PDT)
Samuel Herzog <[email protected]> wrote:

> I like to help in fixing issues.
> 
> But with this one I am not sure if it makes sense to do this, and if
> yes, then what would be the best way.
> 
> http://bugs.freepascal.org/view.php?id=13961
> 
> Paul has already answered, but I am still not happy with the current
> situation.
> 
> TCustomLabel = class(TGraphicControl)
> TCustomSpeedButton = class(TGraphicControl)
> 
> Someone has implemented already the Autosize mechanism for
> TCustomLabel.

I don't see why do you mention TLabel here.
TLabel is more simple than TSpeedButton and allows Wordwrap and
OptimalFill. So the AutoSize algorithm will be completely
different.

 
> What do you suggest to do ?
> Create a class TCustomGraphicControl with AutoSize support and then
> inherit TCustomLabel and TCustomSpeedButton from this new class ?

What is the gain?

Why not simply implement procedure
TCustomSpeedButton.CalculatePreferredSize?

Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to