Registriert seit: 23. Aug 2008
Ort: Keine Ergebnisse gefunden
290 Beiträge
|
AW: StringGrid roter Rahmen
1. Mai 2016, 18:20
hey,
ist nur ein Ausschnitt!
Delphi-Quellcode:
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
StringGrid1.Canvas.Font.Color := clblack;
if StringGrid1.Cells[0, ARow] = '1' then
begin
StringGrid1.Canvas.Brush.Color := $004080FF;
end else
if StringGrid1.Cells[0, ARow] = '2' then
begin
StringGrid1.Canvas.Brush.Color := $004080FF;
end else
if StringGrid1.Cells[0, ARow] = '3' then
begin
StringGrid1.Canvas.Brush.Color := $004080FF;
end else
if StringGrid1.Cells[0, ARow] = '11' then
begin
StringGrid1.Canvas.Brush.Color := $004080FF;
end else
if StringGrid1.Cells[0, ARow] = '4' then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
end else
if StringGrid1.Cells[0, ARow] = '5' then
begin
StringGrid1.Canvas.Brush.Color := clyellow;
end else
if StringGrid1.Cells[0, ARow] = '6' then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
end else
if StringGrid1.Cells[0, ARow] = '7' then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
end else
if StringGrid1.Cells[0, ARow] = '8' then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
end else
if StringGrid1.Cells[0, ARow] = '9' then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
end else
if StringGrid1.Cells[0, ARow] = '10' then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
end;
if gdSelected in State then
StringGrid1.Canvas.Brush.Color := clMenu;
StringGrid1.Canvas.FillRect( Rect );
StringGrid1.Canvas.TextRect( Rect, Rect.Left, Rect.Top, StringGrid1.Cells[ACol, ARow] );
Stringgrid1.Canvas.Pen.Color:=clRed;
//Stringgrid1.Canvas.Rectangle(Rect.Left, Rect.Top, Rect.Right StringGrid1.cells[aCol, aRow]); // was ist hier falsch?
end;
|
|
Zitat
|