[Lazarus] TCoolBar improvements

Mattias Gaertner nc-gaertnma at netcologne.de
Thu May 22 14:16:12 CEST 2014


On Thu, 22 May 2014 12:36:20 +0200
Vojtěch Čihák <vojtech.cihak at atlas.cz> wrote:

> I've got one objection to AlignControls() method. It's implementation in LCL differs from Delphi.
> While in Delphi it comes with parameter AControl: TControl - currently aligned control, in LCL
> is this parameter always nil but method is triggered many times (as many controls container has).
> Therefore I am careful with using it; it can easily lead to redundant calculations.

Hint: When changing multiple properties use Disable/EnableAutoSizing:

http://wiki.lazarus.freepascal.org/Autosize_/_Layout#Reduce_overhead_with_DisableAutoSizing.2C_EnableAutoSizing

Mattias




More information about the Lazarus mailing list