PDA

View Full Version : افزودن یک پراپرتی به پراپرتی های Tform



Developer Programmer
چهارشنبه 29 آبان 1387, 02: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;

amin_alexi
چهارشنبه 29 آبان 1387, 08:49 صبح
سلام
تو قسمت Public این خط رو اضافه کن

procedure SetText( Text:string);