Subject | TIB_Grid coloring partial cell |
---|---|
Author | lee@leeway-be.com |
Post date | 2001-03-01T10:49:33Z |
Hi,
I want, in certain columns, change a partion of the cell into another
color (not the whole cell, just a part of it).
Using the components I use now I do this this way
begin snippit
{
procedure TMain.GridInBusDrawColumnCell(Sender: TObject; const Rect:
TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var NewRect: TRect;
begin
with Sender as TDBGrid, Canvas do
begin
NewRect := Rect;
NewRect.Left := NewRect.Left;
NewRect.Right := NewRect.Left + 1;
Font.Color := clRed;
Brush.Color := clBlue;
FillRect(NewRect);
end;
end;
}
end snippit
How do I do this with the TIB_Grid component ?
Also, is there a equivalent to the DrawColumnCel event that I have
now ?
regards
lee
I want, in certain columns, change a partion of the cell into another
color (not the whole cell, just a part of it).
Using the components I use now I do this this way
begin snippit
{
procedure TMain.GridInBusDrawColumnCell(Sender: TObject; const Rect:
TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var NewRect: TRect;
begin
with Sender as TDBGrid, Canvas do
begin
NewRect := Rect;
NewRect.Left := NewRect.Left;
NewRect.Right := NewRect.Left + 1;
Font.Color := clRed;
Brush.Color := clBlue;
FillRect(NewRect);
end;
end;
}
end snippit
How do I do this with the TIB_Grid component ?
Also, is there a equivalent to the DrawColumnCel event that I have
now ?
regards
lee