| Цитата(Poseidon @ 17.6.2015, 10:19) | | Код | procedure TForm1.DBGridDrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState); begin with (Sender as TDBGrid).Canvas do begin FillRect(Rect);
if (Sender as TDBGrid).DataSource.DataSet.FieldByName('VidRabot').AsString.Equals('демонтаж') then Font.Color := clRed;
if (Sender as TDBGrid).DataSource.DataSet.FieldByName('VidRabot').AsString.Equals('монтаж') then Font.Color := clGreen;
TextOut(Rect.Left + 2, Rect.Top + 3, Field.AsString); end; end;
|
Многострочность, в принципе, делается так же, через TextOut. |
Спасибо большое)) |