bonjour
je voudrais savoir comment changer la couleur du texte d'une cellule dans mon string grid
merci infiniment
Version imprimable
bonjour
je voudrais savoir comment changer la couleur du texte d'une cellule dans mon string grid
merci infiniment
il faut modifier le stringGridDrawCell....
Il doit y avoir deja pas mal d'exemple dans ce forum ....Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 void __fastcall TForm1::StringGrid1DrawCell(TObject *Sender, int Col, int Row, TRect &Rect, TGridDrawState State) { s = StringGrid1->Cells[Col][Row]; TRect R1; TRect R2; AnsiString t; StringGrid1->Canvas->Font->Color=clBlack; StringGrid1->Canvas->Font->Size=8; if (Row==3) { StringGrid1->Canvas->Font->Color=clRed; StringGrid1->Canvas->Font->Size=8; StringGrid1->Canvas->TextRect(Rect, Rect.Left , Rect.Top , s); } }