EhLib.Com
https://forum.ehlib.com/en/

changing color of MultiTitle when using VCL Themes
https://forum.ehlib.com/en/viewtopic.php?f=5&t=1175
Page 1 of 1

Author:  rhcarpenter [ 06 Sep 2022, 15:51 ]
Post subject:  changing color of MultiTitle when using VCL Themes

I am using Delphi 10.4 and EhLib 10.0.

I have LocationGrid.TitleParams.MutliTitle set to True. I am trying to color the top row of the title using the following event handler. This works if I do not have a VCL Theme enabled. But if VCL themes are enabled, the color isn't changed. Is there a way to make this work when using themes?

procedure TformParent3.LocationGridGetMultiTitleParams(Grid : TCustomDBGridEh;
Params : TDBGridDrawTitleCellParamsEh);
begin
CodeSite.EnterMethod('TformParent3.LocationGridGetMultiTitleParams');

if (Params.Column = nil) then
begin
if (Params.MultiTitleNode <> nil) and
(Params.MultiTitleNode.Text = 'LOCATIONS ON THIS POLICY') then
begin
Params.Color := RGB(0,255,255);
Params.SecondColor := RGB(135,206,235);
end;

Params.Font.Style := [fsBold];
end;

CodeSite.ExitMethod('TformParent3.LocationGridGetMultiTitleParams');
end;

Thanks,
Randall Carpenter

Author:  EhLibSupport [ 21 Sep 2022, 16:12 ]
Post subject:  Re: changing color of MultiTitle when using VCL Themes

Hello

I don't see the full grid settings.
Do you have TDBGridEh.TitleParams.FillStyle = cfstGradientEh ?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/