Registriert seit: 19. Apr 2003
Ort: Düsseldorf
835 Beiträge
|
3. Mai 2003, 21:54
Hi!
Was Besseres fällt mir um die Uhrzeit nicht ein, aber probier's mal hiermit:
Delphi-Quellcode:
var
grid_x : Integer = -1;
grid_y : Integer;
implementation
{$R *.dfm}
procedure TForm1.StringGrid1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
grid_x:=StringGrid1.MouseCoord(x,y).x;
grid_y:=StringGrid1.MouseCoord(x,y).y;
end;
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if (ACol = grid_x) and (ARow = grid_y) then
begin
StringGrid1.Canvas.Brush.Color:=clGreen;
StringGrid1.Canvas.FillRect(rect);
StringGrid1.Canvas.TextRect(rect,rect.left+2,rect.top+2,StringGrid1.Cells[Acol,Arow]);
end else inherited;
end;
MfG,
Peter
[edit=Daniel B]Delphi-Tags gesezt. MfG Daniel B.[/edit]
Christian S. Admin in der Entwickler-Ecke
|
|
Zitat
|