1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Unit2, Unit3, Unit4, Dialogs, Grids, StdCtrls;
type TForm1 = class(TForm) private M: array[1..10,1..10] of TMemo; procedure MemoClickHandler(Sender: TObject); public end;
var Form1: TForm1; Anz,i,j: Integer; M: array[1..10,1..10] of TMemo;
implementation
{$R *.dfm}
procedure TForm1.MemoClickHandler(Sender: TObject); begin Form3.show; end;
procedure TForm1.Button3Click(Sender: TObject); begin Anz:=StringGrid1.RowCount; For i := 1 to Anz do begin For j:=1 to Anz do begin M[i,j] := TMemo.Create(Self); M[i,j].Parent := Self; M[i,j].OnClick:=MemoClickHandler; end; end; end;
end. |