Undeclared identifier: 'forbidden |
答題得分者是:pceyes
|
gptesu
一般會員 ![]() ![]() 發表:14 回覆:14 積分:5 註冊:2008-09-09 發送簡訊給我 |
我是引用這裏的例子,不知為何會出現這個unit Unit1;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } procedure aclick(Sender:TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.aclick(Sender:TObject); begin showmessage(TButton(sender).Caption); end; procedure TForm1.FormCreate(Sender: TObject); var x : integer ; begin for x := 1 to 50 do begin with TButton.Create(self) do begin Parent:=Form1; width:=40; height:=20; left:=trunc((x-1)/10)*50; top:=((x-1)mod 10)*30; caption:=inttostr(x); tag:=x; forbidden:=AClick; end; end; end; end. [/code] |
pceyes
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:70 回覆:657 積分:1140 註冊:2003-03-13 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |