Lazarus

Programming => LCL => Topic started by: zoltanleo on March 16, 2017, 11:23:22 am

Title: Can't change font color SpeedButton. Bug?
Post by: zoltanleo on March 16, 2017, 11:23:22 am
Hi, friends.

I try to change color of a font, but it is impossible to me

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   with SpeedButton1 do
  4.   begin
  5.     Font.Color:= clRed;
  6.     Font.Size:= 20;
  7.     Font.Orientation:= 50;
  8.     Font.Quality:= fqAntialiased;
  9.     Flat:=True;
  10.     Transparent:= True;
  11.   end;
  12.  
  13.   with SpeedButton2 do
  14.   begin
  15.     Font.Color:= clFuchsia;
  16.     Font.Size:= 20;
  17.     Flat:=False;
  18.     Transparent:= False;
  19.   end;
  20. end;

This is a bug? or I use settings of a component incorrectly?

p.s. I attached files of the project
Title: Re: Can't change font color SpeedButton. Bug?
Post by: Handoko on March 16, 2017, 01:39:00 pm
It works correctly on my Lazarus 1.6.2 FPC 3.0.0 x86_64-linux gtk 2 computer with Ubuntu Mate 16.10 operating system.
Title: Re: Can't change font color SpeedButton. Bug?
Post by: zoltanleo on March 16, 2017, 02:54:50 pm
Hi, friend.

Are you precisely use the TSpeedButton component? Sorry, probably, you copied my code with other names of buttons

I tried to start my project on Lazarus 1.6.2 in Win XP SP2 Prof. The result can be seen on the picture.

Please, try to import at yourself on Linux my project from the first message. Thanks.
Title: Re: Can't change font color SpeedButton. Bug?
Post by: Josh on March 16, 2017, 03:57:26 pm
Have you tried turning off theme in project options ( project options, un tick use manifest resource and enable themes)

It might be worth looking at this thread.

http://forum.lazarus.freepascal.org/index.php?topic=20649.0

Title: Re: Can't change font color SpeedButton. Bug?
Post by: Handoko on March 16, 2017, 04:23:18 pm
@zoltanleo

I tested again but now using the project file you provided on Lazarus 1.6.4 FPC 3.0.2 Ubuntu Mate 16.10. No problem here, so it seems to be Windows related issue.
Title: Re: Can't change font color SpeedButton. Bug?
Post by: zoltanleo on March 16, 2017, 04:40:41 pm
Thanks, friend. You very much helped me. It is a bug.
Title: Re: Can't change font color SpeedButton. Bug?
Post by: rvk on March 16, 2017, 04:55:32 pm
Did you look at the post from josh?

If I run your program with themes disabled through the manifest (like suggested) I get attached form (Windows 10/Laz1.6).
Title: Re: Can't change font color SpeedButton. Bug?
Post by: zoltanleo on March 16, 2017, 05:00:31 pm
Have you tried turning off theme in project options
hmmm...

You are right. In case of switch-off of the option "Use manifest file..." colors are displayed correctly.

But how now to use the subjects Windows?
Title: Re: Can't change font color SpeedButton. Bug?
Post by: zoltanleo on March 16, 2017, 05:02:05 pm
Did you look at the post from josh?

If I run your program with themes disabled through the manifest (like suggested) I get attached form (Windows 10/Laz1.6).
Yes, I noted it not directly. I understood a situation. Thanks for the help
TinyPortal © 2005-2018