Application的onactionexecute在什么时候会被触发!!! procedure TMainForm.ApplicationEventsActionExecute(Action: TBasicAction; var Handled: Boolean);begin showmessage('Event OnActionExecute');end;从来就没有被执行过。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在form上放着一个button,applicationevents,actionlist控件,增加一个action到actionlist中,action1没有实现onexecute函数,设置button1的action属性为action1。发现button1的按钮式灰色的。。源代码如下unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ActnList, AppEvnts;type TForm1 = class(TForm) ApplicationEvents1: TApplicationEvents; ActionList1: TActionList; Action1: TAction; Button1: TButton; procedure ApplicationEvents1ActionExecute(Action: TBasicAction; var Handled: Boolean); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.ApplicationEvents1ActionExecute(Action: TBasicAction; var Handled: Boolean);begin showmessage('execute');end;end.可是如果给action1增加了onexecute函数procedure TForm1.Action1Execute(Sender: TObject);begin ;;end;哪怕是空语句procedure TForm1.ApplicationEvents1ActionExecute(Action: TBasicAction; var Handled: Boolean);begin showmessage('execute');end;事件就会被触发!可是帮助手册上不是说,onactionexecute是当组件的动作列表中没有定义OnExecute的事件处理程序时,对组件的OnExecute事件进行响应 。这个好像恰恰相反!!! 他说的是不处理,不是不定义,当然指的是ActionManger,而不是Action 写一个软件 在自己电脑上能用 在网吧有的功能实现不了 如何设置是tabse让标签移到下边? GroupBox组件问题 如何修改StringGrid控件代码使其在各个Cell中嵌入ListBox?请高手帮忙,谢谢! 有什么可以代替Close和Open刷新数据集? 定尖高手请进,急,在线等.... 服务器程序关闭之后,所有的客户端程序立马全死?!100分求解 COM+封装ADO问题,请教高手,急! 怎么装的DELPHI时老是出现错误啊 我想让输入密码时大小写都可以,应该用哪个函数处理??? 怎么用dbedit用条件查询和写入数据? 权限查询,admin
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ActnList, AppEvnts;type
TForm1 = class(TForm)
ApplicationEvents1: TApplicationEvents;
ActionList1: TActionList;
Action1: TAction;
Button1: TButton;
procedure ApplicationEvents1ActionExecute(Action: TBasicAction;
var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.ApplicationEvents1ActionExecute(Action: TBasicAction;
var Handled: Boolean);
begin
showmessage('execute');
end;end.可是如果给action1增加了onexecute函数
procedure TForm1.Action1Execute(Sender: TObject);
begin
;;
end;
哪怕是空语句
procedure TForm1.ApplicationEvents1ActionExecute(Action: TBasicAction;
var Handled: Boolean);
begin
showmessage('execute');
end;
事件就会被触发!
可是帮助手册上不是说,onactionexecute是当组件的动作列表中没有定义OnExecute的事件处理程序时,对组件的OnExecute事件进行响应 。
这个好像恰恰相反!!!