Главная страница
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.051 c
1-1154337186
Demand
2006-07-31 13:13
2006.09.10
Динамическое создание форм


1-1153998769
vain
2006-07-27 15:12
2006.09.10
RxGIFAnimator


15-1155826819
ArtemESC
2006-08-17 19:00
2006.09.10
Забыл...


15-1155573637
qqqqqqq
2006-08-14 20:40
2006.09.10
Кто разбирается в ОС (Unix,Linux)? Какой Linux посоветуете?


15-1155485051
ArtemESC
2006-08-13 20:04
2006.09.10
Что далает программа Exe2Bin