Вниз
Скачать: 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.01 c
1-49036
zolotov
2003-01-07 20:09
2003.01.16
Formula One


6-49180
Destro
2002-10-27 02:07
2003.01.16
ПЛИЗ, ХЕЛП !!!


6-49189
hedgehoge
2002-11-16 13:01
2003.01.16
CallBack DCOM


14-49261
Nimda
2002-12-27 07:54
2003.01.16
Мастак-это круто.


3-48871
Step
2002-12-18 17:15
2003.01.16
Сумма строкой




   Наверх