[lazarus] Patch win32 intf/lcl: brush init

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Sep 25 11:15:06 EDT 2003


On Thu, 25 Sep 2003 15:17:23 +0200
"Marc Weustink" <marc.weustink at cuperus.nl> wrote:

> + From: Micha Nelissen [mailto:M.Nelissen at student.tue.nl]
> + Sent: donderdag 25 september 2003 8:01
> + To: lazarus at miraclec.com
> + Subject: [lazarus] Patch win32 intf/lcl: brush init
> +
> +
> + Hi,
> +
> + It seems sometimes the brush is not initialized when referenced in
> + win32callback. Therefore I had to move the CreateBrush method from
> + protected to public and call it. Attached is a patch for this, apply in
> + lcl/.
> 
> Hmm... I don't know it this is the correct way to do it. I don't like the
> idea that the interface it creating object for the LCL. The LCL should
> handle that itself.
> 
> + It's also possible to write a GetBrush method to initialize on demand.
> 
> That is a better way.
> 
> In Delphi the Wincontrol.Brush is always created. In the LCL it is by
> default nil since onle a few components need it. In that case we need a
> GetBrush to create it Dynamic.

Or BrushNeeded.


Mattias






More information about the Lazarus mailing list