紧急求助 ActionList shortcut 失效的问题。

spring_cj 2007-05-09 07:07:52

procedure TFormMainframe.LoadFrame(className: string; caption: string);
var
curFrame : TFrame;
i : Integer;
theTabSheet : TRzTabSheet;
begin
theTabSheet := TRzTabSheet.Create(self);
theTabSheet.Caption := caption;
if GetClass(className) <> nil then
begin
curFrame := TFrameClass(Findclass(className)).Create(theTabSheet);
curFrame.Parent := theTabSheet;
curFrame.Align := alClient;
frameList.Add(curFrame);
end;
theTabSheet.PageControl := pgcWorkArea;
pgcWorkArea.ActivePageIndex := pgcWorkArea.PageCount - 1;

end;

使用这句时curFrame.Parent := theTabSheet; frame中ActionList设置的shortcut失效,如果在frame设计界面上先生成一个tabsheet(tabTemp),那么调用curFrame.Parent := tabTemp;shortcut起作用。点解?
...全文
185 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
kongfancheng 2007-05-10
  • 打赏
  • 举报
回复
应该用全局键盘钩子。
你可以先在主窗体上捕获试试,记得打开KeyPreview属性。

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧