A
aynes
Unregistered / Unconfirmed
GUEST, unregistred user!
var
a: TPopupMenu;
b: TMenuItem;
begin
a:=TPopupMenu.Create(Application);
b:=TMenuItem.Create(a);
b.Caption:='abc';
a.Items.Add(b);
PopupMenu:=a;
b.OnClick :=mypopupclick(b.Caption);
end;
执行到"b.OnClick :=mypopupclick(b.Caption);"出错:Error] Unit1.pas(78): Incompatible types: 'TNotifyEvent' and 'procedure, untyped pointer or untyped parameter'
a: TPopupMenu;
b: TMenuItem;
begin
a:=TPopupMenu.Create(Application);
b:=TMenuItem.Create(a);
b.Caption:='abc';
a.Items.Add(b);
PopupMenu:=a;
b.OnClick :=mypopupclick(b.Caption);
end;
执行到"b.OnClick :=mypopupclick(b.Caption);"出错:Error] Unit1.pas(78): Incompatible types: 'TNotifyEvent' and 'procedure, untyped pointer or untyped parameter'