Recent

Author Topic: Can't change font color SpeedButton. Bug?  (Read 7941 times)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Can't change font color SpeedButton. Bug?
« 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
« Last Edit: March 16, 2017, 12:21:15 pm by zoltanleo »
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Can't change font color SpeedButton. Bug?
« Reply #1 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.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Can't change font color SpeedButton. Bug?
« Reply #2 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.
« Last Edit: March 16, 2017, 03:43:46 pm by zoltanleo »
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

Josh

  • Hero Member
  • *****
  • Posts: 1270
Re: Can't change font color SpeedButton. Bug?
« Reply #3 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

« Last Edit: March 16, 2017, 04:02:31 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Can't change font color SpeedButton. Bug?
« Reply #4 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.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Can't change font color SpeedButton. Bug?
« Reply #5 on: March 16, 2017, 04:40:41 pm »
Thanks, friend. You very much helped me. It is a bug.
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Can't change font color SpeedButton. Bug?
« Reply #6 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).
« Last Edit: March 16, 2017, 04:57:05 pm by rvk »

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Can't change font color SpeedButton. Bug?
« Reply #7 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?
« Last Edit: March 17, 2017, 07:28:20 am by zoltanleo »
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Can't change font color SpeedButton. Bug?
« Reply #8 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
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

 

TinyPortal © 2005-2018