Recent

Author Topic: TBitBtn & TSpeedButton color not working ...  (Read 3421 times)

1HuntnMan

  • Full Member
  • ***
  • Posts: 183
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
TBitBtn & TSpeedButton color not working ...
« on: October 25, 2023, 04:13:40 pm »
Just yesterday evening, adding a TBitBtn or TSpeedButton to a panel on a form, can't change it's color. It's just white. It defaults to clBtnFace. When I first put in on the form it's pure white even thought the default is clBtnFace. I've tried to change it to any color and Laz just ignores the change. Anyone know how to fix this? I reinstalled Lazarus this morning but the problems still exists.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2044
  • Fifty shades of code.
    • Delphi & FreePascal
Re: TBitBtn & TSpeedButton color not working ...
« Reply #1 on: October 25, 2023, 04:59:12 pm »
You can install the BGRA Controls, there you find what you need. (Probably also in other packages but thats the first the come in my mind to suggest)

Its pretty easy to do:
- install the BGRA Controls and what it reqiures via OPM
- put a BGRAThemeButton on your form
- put a BGRAColorTheme on your form
- connect both together in BGRAThemeButton properties
- adjust the colors however you want
- enjoy it  :-*
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Bart

  • Hero Member
  • *****
  • Posts: 5287
    • Bart en Mariska's Webstek
Re: TBitBtn & TSpeedButton color not working ...
« Reply #2 on: October 25, 2023, 05:56:00 pm »
Disable theming (if you're on Windows).
It's somewhere in Compiler Options (Ctrl+Shift+F11 IIRC).

Bart


lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: TBitBtn & TSpeedButton color not working ...
« Reply #3 on: October 25, 2023, 06:04:10 pm »
Disable theming (if you're on Windows).
It's somewhere in Compiler Options (Ctrl+Shift+F11 IIRC).

Bart

Disable theming is not a good choice in my opinion.

Bart

  • Hero Member
  • *****
  • Posts: 5287
    • Bart en Mariska's Webstek
Re: TBitBtn & TSpeedButton color not working ...
« Reply #4 on: October 25, 2023, 06:27:44 pm »
Disable theming is not a good choice in my opinion.
Of course it's not. But it's the reason why you cannot set the color (at leats I think it is).

Bart

 

TinyPortal © 2005-2018