Recent

Author Topic: Forms color don't change  (Read 4863 times)

VosaxAlo

  • Newbie
  • Posts: 2
Forms color don't change
« on: October 21, 2006, 02:33:33 pm »
Hi to all,

I use a Linux Ubuntu Dapper distro, and I have installed Lazarus with the DEB packages downloaded from sourceforge.net.
All is gone very well.

In my first project, I have tried to change the background color of my Form, but it don't change. For example I have changed the Color property from the default clBtnFace to clNavy, but the Form Color remain grey.

I have tried the Windows version of Lazarus, and in this case the Form Color change correctly.

It's a bug in the Linux version? How can I change the Form Color in another way?

thank's

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Forms color don
« Reply #1 on: October 21, 2006, 05:26:39 pm »
Yes, this is a known missing feature. You can check it's status here:

http://www.freepascal.org/mantis/view.php?id=1006

You can work around this easely. Just set an OnPaint event handler for your form, and add painting code to it:
var
  ARect: TRect;
begin
  Canvas.Brush.Color := clBrown;
  ARect := Bounds(0, 0, Height, Width);
  Canvas.FillRect(ARect);

Notice that I didn't test the code above so it may need some changes.

 

TinyPortal © 2005-2018