Bonjour,
est ce quelqu'un pourrait me passer un exemple de cadrage à droite des textes dans les cellules d'un StringGrid dans OnDrawCell ?
Je patauge un peu ...
Merci
Charly
Bonjour,
est ce quelqu'un pourrait me passer un exemple de cadrage à droite des textes dans les cellules d'un StringGrid dans OnDrawCell ?
Je patauge un peu ...
Merci
Charly
Voici:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 procedure TForm2.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin with TStringGrid(Sender), Canvas do begin FillRect(Rect); InflateRect(Rect, -2, -2); DrawText(Handle, PChar(Cells[aCol, aRow]), -1, Rect, DT_NOPREFIX or DT_SINGLELINE or DT_VCENTER or DT_RIGHT); end; end;
Partager