![]() |
Ereigniss erzeugen
Ich möchte das Ereigniss Stringgrid.OnDrawCells unbedingt manuell auslösen.
Aber wie bei buttons mit( button1.click) bzw. Stringgrid1.DrawCells klappt es nciht. Wie geht das? Mfg zorakh |
Re: Ereigniss erzeugen
Delphi-Quellcode:
:gruebel:
StringGrid1.Repaint;
|
Re: Ereigniss erzeugen
Dann verstehe ich eines nicht.
Ich habe
Delphi-Quellcode:
max ist die Anzahl der Spalten im Grid.
for x:=0 to (max-1) do begin
for y:=0 to (max-1) do begin ColCords:=x; RowCords:=y; StringGrid1.repaint; end; end; Und dann bei OnDraw Cells procedure TForm1.TabelleDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin with TStringGrid(Sender).Canvas do begin if (ACol=ColCords) and (ARow=ColCords) then begin Brush.Color:= clRed; FillRect(Rect); end; end; end; Wieso wird nicht alles rot sondern bekomem ich eine "Zugriffsverlezungs"-Fehlermeldung?! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:43 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz