Forum: Sonstige Fragen zu Delphi
by baumina,
14. Feb 2014
Um einzelne Farben in einer StringGrid zu ändern, gehe ich folgendermaßen vor:
In der zugewiesenen Grid.OnDrawCell procedure:
Grid.Canvas.Brush.Color := clGreen; // optional : Hintergrundfarbe
Grid.Canvas.Font.Color := clRed; // optional : Schriftfarbe
Grid.Canvas.FillRect(Rect); // Zelle mit Hintergrundfarbe füllen
Rect.Left := Rect.Left + 2;
Rect.Right := Rect.Right - 2;
Forum: Sonstige Fragen zu Delphi
by baumina,
13. Feb 2014
Mein Vorschlag wäre folgender :
var
StartNr : Integer;
begin
try
StartNr := StrToInt(trim(Startnummer.text)); // Leerstellen rausnehmen und in Zahl umwandeln
except