Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem Vykreslovani ve StringGridDrawCell (Delphi)

a) Vykreslují v StringGridDrawCell
b) Nezapomněl.

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol,
ARow: Integer;Rect: TRect; State: TGridDrawState);
var
R: TRect;
TW, TL:Integer;
begin
if (Acol = 0) and (ARow > -1) then
if StringGrid.Cells[3,ARow] = '-1' then
ImageList1.Draw(StringGrid.Canvas, Rect.Left-2 , Rect.Top +4 , 1)
else
ImageList1.Draw(StringGrid.Canvas, Rect.Left-2 , Rect.Top +4 , 2);
StringGrid.Invalidate;

if ACol = 3 then
begin
TW := StringGrid.Canvas.TextWidth(StringGrid.Cells[ACol, ARow]);
TL := Rect.Right - TW - 4;
StringGrid.Canvas.FillRect(Rect);
StringGrid.Canvas.TextOut(TL, Rect.Top + 4, StringGrid.Cells[ACol, ARow]);
end;
end;

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny