[Lazarus] TextStyle.Layout and "Argument can't be assigned to"

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jan 18 12:23:15 CET 2010


On Mon, 18 Jan 2010 13:02:43 +0200
Zaher Dirkey <parmaja at gmail.com> wrote:

> I have this error In my component
> Error: Argument can't be assigned to
> 
> FPC 2.4.0
> 
> {$mode objfpc}{$H+}
> 
>   with Canvas do
>   begin
>     TextStyle.Layout := tlCenter;
>     TextStyle.Alignment := taCenter;
>   end;
> 
> How to resolve it?

  s: TTextStyle;
begin
  s:=Canvas.TextStyle;
  s.Layout := tlCenter;
  Canvas.TextStyle:=s;

Mattias



More information about the Lazarus mailing list