//-----------------------------------------------------------------------------
//in
source...
__fastcall TForm1::TForm1(TComponent*
Owner)
: TForm(Owner)
{
StringGrid1->RowCount
= 1;
StringGrid1->FixedRows
= 0;
StringGrid1->DefaultDrawing
= false;
}
//-----------------------------------------------------------------------------
void __fastcall
TForm1::StringGrid1DrawCell(TObject *Sender, long Col, long
Row,
TRect &Rect, TGridDrawState
State)
{
StringGrid1->Canvas->Brush->Color = clBtnFace;
StringGrid1->Canvas->FillRect(Rect);
Frame3D(StringGrid1->Canvas, Rect, clBtnHighlight, clBtnShadow, 1);
StringGrid1->Canvas->TextRect(Rect, Rect.Left, Rect.Top,
StringGrid1->Cells[Col][Row]);
}
|