Autor Beitrag
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: Fr 30.01.09 16:42 
Trenne das doch.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var
  stundenplan: array [1..5,1..4] of string;
  stunde, tag: integer
begin 
  for tag := 1 to 5 do
    for stunde := 1 to 4 do
      stundenplan[tag, stunde] := StringGrid1.Cells[tag, stunde];

  for tag := 1 to 5 do
    for stunde := 1 to 4 do
      StringGrid2.Cells[tag, stunde] := stundenplan[tag, stunde];
Und wenn das im StringGrid in Zelle 0 losgeht, dann musst du dort -1 schreiben.
ausblenden Delphi-Quelltext
1:
StringGrid1.Cells[tag - 1, stunde - 1]					
(Vielleicht auch nur bei tag oder stunde, falls du doch eine Beschriftung in einer Richtung benutzt.)

Und um das in zwei Buttons zu machen musst du das Array als Feld oben unter private schreiben.
luckyluc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 103



BeitragVerfasst: Fr 30.01.09 16:52 
ok, danke werds versuchen
luckyluc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 103



BeitragVerfasst: Fr 30.01.09 17:02 
Mensch, warum bin ich denn nicht bloß mal sebst drauf gekommen :(
Ihr habt mir alle sehr weitergeholfen. Danke! :wink: Und ich hab mal wieder was dazu gelernt.