View Issue Details

IDProjectCategoryView StatusLast Update
0009285LazarusOtherpublic2016-10-14 12:44
ReporterAlexander Desyatnichenko (10) Assigned ToVincent Snijders  
Status closedResolutionfixed 
Product Version0.9.22 
Summary0009285: Button.Color
DescriptionCan not set Button.Color in Form using Lazarus IDE.
TagsNo tags attached.
Fixed in Revision
Attached Files


duplicate of 0001188 closedVincent Snijders Color property of tbutton doesn't work. 
related to 0023309 resolvedwp all buttons' font color doesn't change and stays black 


2007-07-17 11:06


logoxunit1.7z (1,645 bytes)

Vincent Snijders

2007-07-18 22:53

manager   ~0013768

AFAIK, changing the color of a button on windows can only be done if you use onwnerdrawn buttons.

I don't that is worth the trouble.

For now this is left open for the future and probably 'not fixable' or 'won't fix' unless somebody provides a way of changing a buttons color without making it ownerdrawn.

Felipe Monteiro de Carvalho

2008-01-31 13:15

developer   ~0017542

I think no such thing is possible. Reading further even Qt doesn't allow this too:

For consistency I propose to unpublish the color property for TButton, define it should not have a color other then the default theme one and mark this as fixed (in the sense that having a published color property that doesn't work was a bug).

Felipe Monteiro de Carvalho

2008-01-31 13:21

developer   ~0017543

TBitBtn and TSpeedButton also have the same problem. TSpeedButton is owner drawn, but themed. I'm not sure if it could have a color property.

Graeme Geldenhuys

2008-02-01 08:01

reporter   ~0017553

It's a bug in LCL and needs to be fixed! If not, it's a serious limitation on LCL's part and is not good.

It is possible to do with Qt as well. Why does Kylix 3 then allow you to change the Color property? It's a published property of TControl, so all decendants should have support for it. See the attached screenshot of Kylix 3 in action.

2008-02-01 08:01


kylix3_button_color.png (17,277 bytes)   
kylix3_button_color.png (17,277 bytes)   

Paul Ishenin

2008-02-01 17:08

manager   ~0017559

Kylix = qt = library that draw widgets itself
Win32 = library that also has some mids about widget drawing

Why LCL should invent hacks to force win32 draw color buttons? If win32 doesnot want to do that why LCL should have ability to override desinged by ms devels way of button drawing?

LCL is library of native widgets = library that uses abilities of underlying libraries. If they (win32 or other) doesnot support something then LCL should not invent own ways.

My opinion - this issue should be closed.


2008-02-01 18:07

reporter   ~0017560


Graeme Geldenhuys

2008-02-07 09:46

reporter   ~0017629

Ok, so LCL uses native widgets - I get that. Well, Qt is supported widget set of LCL. So Qt should in all respects be consider 'native'. So now, because Win32 doesn't allow Button.Color, Qt may not use Button.Color either! That's a bit unfair. The LCL now limits developers only to what Win32 can do! What happened to LCL being cross-platform? What about the features of other underlying native widget sets?

Is Win32 the controlling widget set for LCL. If Win32 doesn't support something, neither may the other widget sets?

Alexander Desyatnichenko (10)

2008-02-28 13:25

reporter   ~0017998

For now result file in win32 look like here: ( )

But in CentOS it look better (like in kylix3_button): ( )

Vincent Snijders

2009-05-06 11:36

manager   ~0027372

Button.Color has been published.

It has been marked as a restricted property in the object inspector for Carbon and win32.

Issue History

Date Modified Username Field Change
2007-07-17 11:06 Alexander Desyatnichenko (10) New Issue
2007-07-17 11:06 Alexander Desyatnichenko (10) File Added: logoxunit1.7z
2007-07-17 11:06 Alexander Desyatnichenko (10) Widgetset => Win32
2007-07-17 14:05 Vincent Snijders LazTarget => 1.0
2007-07-17 14:05 Vincent Snijders Status new => acknowledged
2007-07-18 07:45 Felipe Monteiro de Carvalho Relationship added duplicate of 0001188
2007-07-18 22:53 Vincent Snijders LazTarget 1.0 => post 1.2
2007-07-18 22:53 Vincent Snijders Note Added: 0013768
2008-01-31 13:15 Felipe Monteiro de Carvalho Note Added: 0017542
2008-01-31 13:21 Felipe Monteiro de Carvalho Note Added: 0017543
2008-02-01 08:01 Graeme Geldenhuys Note Added: 0017553
2008-02-01 08:01 Graeme Geldenhuys File Added: kylix3_button_color.png
2008-02-01 17:08 Paul Ishenin Note Added: 0017559
2008-02-01 18:07 Christian Note Added: 0017560
2008-02-07 09:46 Graeme Geldenhuys Note Added: 0017629
2008-02-28 13:25 Alexander Desyatnichenko (10) Note Added: 0017998
2009-05-06 11:36 Vincent Snijders Status acknowledged => resolved
2009-05-06 11:36 Vincent Snijders Resolution open => fixed
2009-05-06 11:36 Vincent Snijders Assigned To => Vincent Snijders
2009-05-06 11:36 Vincent Snijders Note Added: 0027372
2009-10-23 00:39 Marc Weustink Status resolved => closed
2013-09-03 12:07 Martin Friebe LazTarget post 1.2 => 1.4
2016-10-14 12:44 Juha Manninen Relationship added related to 0023309