* * *

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

zoltanleo

  • Jr. Member
  • **
  • Posts: 68
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 »
Lazarus 1.9(rev. 55538); FPC 3.1.1(rev.36290), Windows 7 x64 Ultim/ Debian 8.7 i386

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

Handoko

  • Hero Member
  • *****
  • Posts: 1514
  • 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

  • Jr. Member
  • **
  • Posts: 68
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 »
Lazarus 1.9(rev. 55538); FPC 3.1.1(rev.36290), Windows 7 x64 Ultim/ Debian 8.7 i386

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

josh

  • Sr. Member
  • ****
  • Posts: 404
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 »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

Handoko

  • Hero Member
  • *****
  • Posts: 1514
  • 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

  • Jr. Member
  • **
  • Posts: 68
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.
Lazarus 1.9(rev. 55538); FPC 3.1.1(rev.36290), Windows 7 x64 Ultim/ Debian 8.7 i386

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

rvk

  • Hero Member
  • *****
  • Posts: 2648
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

  • Jr. Member
  • **
  • Posts: 68
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 »
Lazarus 1.9(rev. 55538); FPC 3.1.1(rev.36290), Windows 7 x64 Ultim/ Debian 8.7 i386

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

zoltanleo

  • Jr. Member
  • **
  • Posts: 68
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
Lazarus 1.9(rev. 55538); FPC 3.1.1(rev.36290), Windows 7 x64 Ultim/ Debian 8.7 i386

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

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus