Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-10

clDefault for TCustomControl

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

cobines

Hello.

I have a TCustomControl for which I have set:

ParentColor := False;
Color := clDefault;

On Linux/LCLGtk2 and Windows/LCLWin32 this results in clWindow color, but on Linux/LCLQt it is different, looks like clForm or clBackground. When I'm assigning Color:=clDefault I see that
TControl.GetDefaultColor is called and the return value is clWindow. Shouldn't this mean that clDefault will always mean clWindow for this control? Is it normal that the widgetset may overwrite clDefault value?

cobines

Reply by email

Unknown author
to cobines

Citiram cobines :

Show quoted text 14 lines
Hello. I have a TCustomControl for which I have set: ParentColor := False; Color := clDefault; On Linux/LCLGtk2 and Windows/LCLWin32 this results in clWindow color, but on Linux/LCLQt it is different, looks like clForm or clBackground. When I'm assigning Color:=clDefault I see that TControl.GetDefaultColor is called and the return value is clWindow. Shouldn't this mean that clDefault will always mean clWindow for this control? Is it normal that the widgetset may overwrite clDefault value?

If your controls is TCustomControl (then it's base is TQtCustomControl<-TQtAbstractScrollArea) then clDefault = clWindow, if it's not so then
something is wrong or your control Enabled = False. Open an issue and attach example of your control.

zeljko

Reply by email