Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.09.10;
Скачать: 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 вся ветка

Текущий архив: 2006.09.10;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.044 c
2-1155730820
Shaman_
2006-08-16 16:20
2006.09.10
Освободить память после function MyFunction:TMemoryStream;


2-1155721990
444
2006-08-16 13:53
2006.09.10
TImage +загрузка из массива


15-1156015707
Мефисто
2006-08-19 23:28
2006.09.10
х/ф "Планета обезъян" - 2 версии фильма или нет?


1-1154061876
Helen
2006-07-28 08:44
2006.09.10
Ввод пароля


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