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

Как изменить цвет текста в DBGrid?   Найти похожие ветки 

 
viper   (2002-12-23 17:27) [0]

Есть заполненая таблица, и мне нужно некоторые строки выделить другим цветом, т.е. если тип(такое поле) этой записи 1 то скажем строка красным цветом! Если можно, то кинте кусочек кода!


 
Delirium^.Tremens ©   (2002-12-23 17:28) [1]

OnDrawColumnCell + FAQ


 
Леший ©   (2002-12-23 17:39) [2]

with DBGrid1.Canvas do
begin
if (Column.Field.FieldName = "CLOSE") and
not (gdSelected in State) then
if strtofloat(Column.Field.Text)<0 then
begin
Brush.Color:=clRED;
Font.Color:=clWHite;
FillRect(Rect);
TextOut(Rect.Left+2,Rect.Top+2,FormatFloat("### ### ###.##",StrToFloat(Column.Field.Text)));
exit;
end;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State)
end;



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

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



Память: 0.45 MB
Время: 0.014 c
1-48998
diks
2003-01-07 05:58
2003.01.16
!ПЛИЗ!


14-49231
malkolinge
2002-12-26 12:27
2003.01.16
TreeView with CheckBox


1-49012
GrEG
2003-01-04 09:21
2003.01.16
COM/DCOM


6-49177
BackStabber
2002-11-17 16:52
2003.01.16
Взаимодействие с сервером по TCP/IP


3-48914
aus
2002-12-20 20:44
2003.01.16
Транзакции (ADO)




   Наверх