[Lazarus] Autosize behaviour

Mattias Gärtner nc-gaertnma at netcologne.de
Tue Apr 6 13:34:50 CEST 2010


Zitat von Michael Van Canneyt <michael at freepascal.org>:

> [...]
>>> I would use a mechanism similar to the datalink. As soon as you tell the
>>> layout manager to manage a certain control, a hook is installed in the
>>> control.
>>
>> And where is the hook stored?
>
> In TWinControl, protected or even private.

And how to find out which layout a control uses?


> [...]
>> Then don't publish it for TEdit.

Btw, even a TEdit can need a layout to store extra properties, for  
autosizing itself, for special docking, for alignment or for designer  
specials.


> I understand this, I thought of this also. But I think it is more  
> clean if the hook is hidden completely; This
> way one cannot 'forget' to publish it or publish it when it is not
> needed.
>
> Finally, it doesn't really matter. To my taste, my solution is cleaner.
>
> Opinions may vary on what 'clean' is, of course :-)

Your solution seems somewhat limited to the ExtJS layouts.


Mattias







More information about the Lazarus mailing list