Don Payette
2003-06-24 18:20:16 UTC
I have an application that was developed starting in the days
of Delphi 2. It is an MDI application and has a TActionList
on the main form with a TMainMenu and a TControlBar with TToolButtons.
We developed our own toolbar customizer, since TActionManager wasn't around
(or we didn't notice it).
Now I am at a point where I am adding a Macro capability to my
app and I want users to be able to specify their own keyboard
shortcuts to run a macro.
I've created a TAction descendent that has the info I need
(Macro file name, etc), set the shortcut property and add
it to the main forms action list. I then run my app and
press the shortcut key and it works. However, if I then
create an MDIChild, the shortcut no longer works. If I
close the child, it works again. It seems like the child
form isn't inheriting my custom actions.
The static pre-defined actions that are put in the action
list at design time work fine when a child is open.
Any ideas?
How difficult would it be to switch to TActionManager and
would that solve my problem?
Don Payette
Unisys Corporation
of Delphi 2. It is an MDI application and has a TActionList
on the main form with a TMainMenu and a TControlBar with TToolButtons.
We developed our own toolbar customizer, since TActionManager wasn't around
(or we didn't notice it).
Now I am at a point where I am adding a Macro capability to my
app and I want users to be able to specify their own keyboard
shortcuts to run a macro.
I've created a TAction descendent that has the info I need
(Macro file name, etc), set the shortcut property and add
it to the main forms action list. I then run my app and
press the shortcut key and it works. However, if I then
create an MDIChild, the shortcut no longer works. If I
close the child, it works again. It seems like the child
form isn't inheriting my custom actions.
The static pre-defined actions that are put in the action
list at design time work fine when a child is open.
Any ideas?
How difficult would it be to switch to TActionManager and
would that solve my problem?
Don Payette
Unisys Corporation