rgreat Posted October 11, 2023 Share Posted October 11, 2023 Set: procedure TMain.UniDBGrid1DrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin Attribs.Color:=clBlue; end; Now you will not see current cell selection at all. Which make whole usage of Attribs.Color property debatable. Link to comment Share on other sites More sharing options...
rgreat Posted November 10, 2023 Author Share Posted November 10, 2023 Workaround (for default style): add styles (3 for each background color): .cellred { background-color: #ffe6e6; // Main color } .x-grid-item-over .cellred { background-color: color-mix(in srgb, #ffe6e6 33%, #ddd); // mix with hower color } .x-grid-item-selected .cellred { background-color: color-mix(in srgb, #ffe6e6 33%, #98c9ef); // mix with selected color } Set cell style: procedure TFramePodhod.DBG1DrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if something then begin Attribs.Style.Cls:='cellred'; end; end; Result cell background is mixed color: 1 Link to comment Share on other sites More sharing options...
Recommended Posts