Thema: stringgrid

Einzelnen Beitrag anzeigen

Hartfrid Krause

Registriert seit: 20. Feb 2007
90 Beiträge
 
Delphi XE6 Professional
 
#5

AW: stringgrid

  Alt 9. Feb 2012, 10:40
Die Umrandung klappt schon (hier im Beispiel Zelle 3,1), aber nicht, jeweils N U R in der Zelle, die den Eingabefocus hat.
Das muss noch irgendetwas hinzu, was ich nicht weiss
Wer kann da helfen?
Die procedure stringgriddrawcell hat folgende Form:


procedure tform1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
with StringGrid1.Canvas do
begin
if (arow=3) and (acol=1) then
begin
StringGrid1.Canvas.Pen.Color := clred;
StringGrid1.Canvas.Pen.Width := 2;
StringGrid1.Canvas.MoveTo(Rect.Left,Rect.Bottom);
StringGrid1.Canvas.LineTo(Rect.Right,Rect.Bottom);
StringGrid1.Canvas.LineTo(rect.right,rect.top);
StringGrid1.Canvas.LineTo(rect.Left,rect.top);
StringGrid1.Canvas.LineTo(rect.Left,rect.bottom);
end;
end;
end;
  Mit Zitat antworten Zitat