Hello,
I created a new project with only a default AdvStringgrid without changing any property.
I implemented the event GetCellColor with this code :
ABrush.Style := bsSolid;
If ((Arow mod 2)<>0) Then ABrush.Color := clwhite else ABrush.Color := $00F4F3EE;
The resulat I have : ![image](https://support.tmssoftware.com/uploads/default/original/2X/2/2dd144d5326279616ea001c9ab32beb4f4d31300.png)
Why fixed col/row print a gradient instead of solid color ?
Thanks in advance
Please turn gradients off for fixed cells:
procedure TForm1.AdvStringGrid1GetCellColor(Sender: TObject; ARow,
ACol: Integer; AState: TGridDrawState; ABrush: TBrush; AFont: TFont);
begin
ABrush.Style := bsSolid;
if ((Arow mod 2)<>0) then
ABrush.Color := clwhite
else
ABrush.Color := $00F4F3EE;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
advstringgrid1.ControlLook.FixedGradientTo := clNone;
advstringgrid1.ControlLook.FixedGradientMirrorFrom := clNone;
advstringgrid1.ControlLook.FixedGradientMirrorTo := clNone;
advstringgrid1.TMSGradientTo := clNone;
end;
Perfect thank you !
TMSGradientTo seems to not be available on the component editor, so it can only be set to clNone programmatically right ?
Yes, it is a public property.
The alternative for design-time would be to select a grid.Look setting with a solid fixed cell color.
Ok, a big thank you for the reactivity ![:grinning: :grinning:](https://support.tmssoftware.com/images/emoji/apple/grinning.png?v=9)
system
(system)
Closed
6
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.