Autor Beitrag
GI_PC
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 34



BeitragVerfasst: Mi 22.04.09 01:13 
Hey Leute,

Ich habe ein paar Schwierigkeit in Stringgrid, wie schreibe ich Koordinaten in Stringgrid ein? Ich habe schon so oft versuch, aber es ging nicht und weiss nicht wo mein Fehler lag. :(

Stringgrid besteht aus 4 Kolonne und ein paar Zeilen, es hängt davon ab.

Ich drücke auf botton, in Paintbox werden ein paar Ligne, Rechtecke...gezeichnet (random). und das alles soll in Stringstrid kommen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
sg.cells[0,0]:= // welche Art, z.B Ligne oder Kreis...
sg.cells[0,1]:= X1; // (Koordinaten)
sg.cells[0,2]:=
sg.cells[0,3]:=

usw.

Reihe sollte immer +1 sein, aber keng Ahnung warum, bei mir nicht funktioniert hat.

ich hatte mal so versuch:
ausblenden Delphi-Quelltext
1:
2:
for R:= 0 to sg.rowcount-1 do
  sg.cells[0,R]:= Art; // (Art hatte ich schon deklariert)

Könnt ihr mir bitte weiter helfen

Dankeschön

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 22.04.09 01:16 
Ich weiß ja weder was dann für Fehler kamen noch wie dein Quelltext zum Zeichnen aussieht oder was für Variablentypen das sind. :nixweiss:

Schreib doch mal konkret einen Quelltext hin und was dabei für Probleme auftreten. Fehlermeldung, falsches Ergebnis, ...