![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Как изменить цвет одной ячейки в DBGrid
murtazi © (2003-08-01 17:20:00)
Как изменить цвет одной ячейки в DBGrid
Hawk2 (2003-08-01 23:49:00) [1]
Также, только событие будет называться DBGrid1DrawColumnCell и т.д.
ulyanitsky (2003-08-01 20:07:00) [2]
А в стандартном DBGRID как?
murtazi (2003-08-01 18:11:00) [3]
Большое Спасибо!
horse (2003-08-01 17:59:00) [4]Изменит все ячейки поля FieldName, значения к-рых < 0
procedure ToRest.DBGridEh1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumnEh;
State: TGridDrawState);
begin
if Column.FieldName = "FieldName" then
if Column.Field.AsFloat < 0 then
( Sender)Изменит все ячейки поля FieldName, значения к-рых < 0
procedure ToRest.DBGridEh1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumnEh;
State: TGridDrawState);
begin
if Column.FieldName = "FieldName" then
if Column.Field.AsFloat < 0 then
TDBGridEh(Sender).Canvas.Brush.Color := clRed;
TDBGridEh(Sender).DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;