|
스트링 그리드의 색깔을 바꿀려고 하거든요..
근데 셀의 색깔은 바뀌는데..
셀 안의 글자가 안보네요..?? ㅜㅜ;
void __fastcall TForm1::StringGrid1DrawCell(TObject *Sender, int ACol, int ARow, TRect &Rect, TGridDrawState State)
{
long index = ARow * StringGrid1->ColCount + ACol;
StringGrid1->Canvas->Font->Color = clRed;
StringGrid1->Canvas->Font->Style = TFontStyles()<<fsBold;
StringGrid1->Canvas->Brush->Color = ColorBox1->Selected;
StringGrid1->Canvas->FillRect(Rect);
ImageList1->Draw(StringGrid1->Canvas,Rect.Left,Rect.Top,index);
if (State.Contains(gdFocused))
StringGrid1->Canvas->DrawFocusRect(Rect);
}
뭘 어떻게 바꿔야 하는지..
위의 코드를 수정해서 좀 써주세요..ㅠㅠ;
p.s
저번에 글 올려서 답글로..
StringGrid1->Canvas->TextOut(...); 를 쓰라고 받았거든요..
근데..
TextOut()안쓰고 할 수 없나요??
옛날에 했을때는 TextOut()안 쓰고 했었거든요..?
그리고 정 안된다면..
StringGrid1->Canvas->TextOut(...); 를 어떻게 쓰는지 간단한 예제라도..--;
헬프에서 StringGrid1DrawCell찾으니깐 추가정보가 없다고 예제가 안보이네요..ㅠㅠ;
|