[Lazarus] Colourful Themes

zeljko zeljko at holobit.net
Mon May 12 11:22:10 CEST 2014


On 05/12/2014 10:54 AM, Vojtěch Čihák wrote:
> Thanks,
>
> I tried LCLIntf.SetBkColor(Canvas.Handle, clRed); and no visual change.
> And if I try writeln(ColorToString(LCLIntf.SetBkColor(HANDLE, $00FF0000))); it never returns the color that I set (Qt4, GTK2), so it seems widgetsets doesn't support it.

1.SetBkColor as param uses TColorRef, not TColor
2.When setting new color with SetBkColor, old TColorRef is returned as 
result.
var
   AOldColor, ANewColorRef: TColorRef;
begin
   ANewColorRef := ColorToRGB(clRed);
   AOldColor := LCLIntf.SetBkColor(Canvas.Handle, ANewColorRef);
   ...do something
   LCLIntf.SetBkColor(Canvas.Handle, AOldColor);
end;

zeljko





More information about the Lazarus mailing list