Вниз
Скачать: CL | DM;

Закрасить определённую строчку в DBGridEh ?   Найти похожие ветки 

← →
Хой   (2006-07-06 09:58) [0]

Как закрасить определённую строчку в компоненте DBGridEh в зависимости от значения определёного поля ?


← →
имя   (2006-07-06 10:02) [1]

Удалено модератором


← →
_RusLAN ©   (2006-07-06 10:06) [2]

IMHO в OnGetCellParams будет удобней. Там есть параметр Background:TColor


← →
Ega23 ©   (2006-07-06 10:20) [3]


procedure TFClassConfig.dbgCOMUnitsGetCellParams(Sender: TObject;
 Column: TColumnEh; AFont: TFont; var Background: TColor;
 State: TGridDrawState);
var
ds:TDataSet;
begin
 if not (Sender is TDBGridEh) then Exit;
 ds:=TDBGridEh(Sender).DataSource.DataSet;
 if ds.IsEmpty then Exit;
 if ANSIUpperCase(Column.FieldName)="COMMSKSTR" then
  begin
   if ds.FieldByName("COMMsk").AsInteger=0 then
      AFont.Color:=clRed
    else
      AFont.Color:=clBlue;
  end;

 if ANSIUpperCase(Column.FieldName)="COMTYPNAM" then
  begin
   Case ds.FieldByName("COMTypCod").AsInteger of
     10 :  AFont.Color:=clGreen;
     20 :  AFont.Color:=clAqua;
     30 :  AFont.Color:=clBlue;
     else  AFont.Color:=clGray;
   end;
  end;

end;




Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.029 c
8-1140628607
Sour Smile
2006-02-22 20:16
2006.09.10
Как правильно нарисовать дым?


1-1153808383
atruhin
2006-07-25 10:19
2006.09.10
Модальное окно в MDI приложении


2-1155997184
viktoras
2006-08-19 18:19
2006.09.10
Поиск слов по шаблону


2-1156153657
Itoixxx
2006-08-21 13:47
2006.09.10
checkbox


15-1155533371
Ega23
2006-08-14 09:29
2006.09.10
С Днём рождения! 12 августа




   Наверх