Вниз
Скачать: 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
15-1156082439
DillerXX
2006-08-20 18:00
2006.09.10
Друзья, поделитесь опытом


2-1156158306
deplhi
2006-08-21 15:05
2006.09.10
pointers and dll


15-1155503710
Юрий Зотов
2006-08-14 01:15
2006.09.10
IFC Capital Group


3-1151221954
Rama
2006-06-25 11:52
2006.09.10
Трехзвенная архитектура


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




   Наверх