Jump to content

Recommended Posts

Posted

Hi,

 

UniDBGrid1 -> OnDrawColumnCell

 

Attribs.Color  -  row (cell) Color

Attribs.Font.Color  -  font Color

 

try to analyze the demo: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\GridEditors

procedure TMainForm.UniDBGrid1DrawColumnCell(Sender: TObject; ACol,
  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);
begin
  if Column.FieldName = 'Shift' then
  begin
    if Column.Field.AsBoolean then
      Attribs.Font.Color := clGreen
    else
      Attribs.Font.Color := clRed;
  end;
end;

Best regards.

  • Upvote 1
Posted

Thanks,

Row font color 

 

if UniDBGrid1.DataSource.DataSet.FieldByName('STATUS_ID').AsInteger=1 then
   begin
     Attribs.Font.Style:=[fsbold];
     Attribs.Font.Color:=clred;
   end;
  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...