Developer Programmer
چهارشنبه 29 آبان 1387, 03:19 صبح
میخوام یک پراپرتی به From1:Tform اضافه کنم .منتها دلفی کلید کرده که Field or method identifier expected
type
TForm1 = class(TForm)
Button1: TButton;
private
procedure SetText(text:string);
public
property MyText:string write SetText;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.SetText( Text:string);
begin
Memo1.Lines.Add(Text);
end;
type
TForm1 = class(TForm)
Button1: TButton;
private
procedure SetText(text:string);
public
property MyText:string write SetText;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.SetText( Text:string);
begin
Memo1.Lines.Add(Text);
end;