procedure TMainForm.ApplicationEventsActionExecute(Action: TBasicAction;
var Handled: Boolean);
begin
showmessage('Event OnActionExecute');
end;从来就没有被执行过。
var Handled: Boolean);
begin
showmessage('Event OnActionExecute');
end;从来就没有被执行过。
解决方案 »
- checkbox1.State:=cbGrayed;后,照样单击可以使用,那这个cbGray干吗用?
- 错误恢复问题
- 连接access时,如何把连接设为相对路径!
- 从SQL Server导出的数据怎样把数据类型,数据长度定位到TStringGrid的各列?
- 为何locate('sno;cno',VarArrayOf([edit1.text,edit2.text]),[locaseInsensitive,loPartialKey])编译出错?
- 急!Excel分页的问题!大伙帮帮忙!
- 有没有了解创智情况的朋友?想去创智,了解一下情况先!
- 谁有delphi7的注册机 ? Help ..
- 如何改变Windows桌面
- 怎样用delphi 生成 html 文件?
- 怎么用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事件进行响应 。
这个好像恰恰相反!!!