Recent

Author Topic: Identifier not found "bcaCenter"  (Read 2245 times)

nibor

  • New member
  • *
  • Posts: 6
Identifier not found "bcaCenter"
« on: April 24, 2013, 02:12:07 pm »
Hi,

I am new to Lazarus and BGRABitmap so this might be a basic question.

I am trying to convert a game I made to use this library.  I found if I put an instance of TBCLabel on the Form1 from the BGRA Controls menu and set e.g. FontEx.TextAlignment := bcaCenter using the Object Inspector interface, Lazarus compiles fine.

However, when I try the following:

var
  Form1: TForm1;
  PuzzleGrid : array [1..81] of TBCLabel;    {basic grids of number label for the puzzle}
.
.
.
.
   PuzzleGrid[k] := TBCLabel.Create(Self);
   with PuzzleGrid[k] do
   begin
    AutoSize := false;
    FontEx.Color := clBlack;
    FontEx.EndEllipsis := False;
.
.
    FontEx.FontQuality:=fqFineAntialiasing;
.
.
    FontEx.TextAlignment := bcaCenter;
.
.
    Background.Style := bbsColor;

   end;

On compiling Lazarus gives the message Error: Identifier not found "bcaCenter".  The same happens for fqFineAntialiasing and bbsColor.

I'd appreciate it if anyone can point out what I'm missing here.




howardpc

  • Hero Member
  • *****
  • Posts: 3553
Re: Identifier not found "bcaCenter"
« Reply #1 on: April 24, 2013, 04:39:38 pm »
You need to add
Code: [Select]
..., BCTypes, ...
to your uses statement. You may find you also need the unit BGRABitmapTypes.

nibor

  • New member
  • *
  • Posts: 6
Re: Identifier not found "bcaCenter"
« Reply #2 on: April 24, 2013, 06:08:33 pm »
Many thanks,  that worked.

 I already had BCTypes in Uses but it seems it was BGRABitmapTypes I also needed.

Thanks for taking the time to reply.


 

TinyPortal © 2005-2018