I have 2 forms which I'd like to share one single TActionManager
and assigned TAction
-s.
First form is main form - it holds TActionManager
, TAction
with caption "Action".
Main menu of Form1 has this action and menuitem caption property set to "Action A". Form2 includes Form1 and also assigns action to menuitem and caption is set to "Action B".
During design time everything looks good - menu items are named "Action A" and "Action B" in Form1 and Form2 and same action is assigned. It also works fine during runtime (OnExecute is properly processed for both forms).
However - during runtime, Form1 menu item has caption "Action A" and Form2 has menu item caption "Action" just like the action caption.
Am I including them incorrectly, is it possible to include Form1 on Form2 to share action and to change caption? Is it a bug in D2010 / CB2010?
Example:
- Create Form1 and Form2 and add main menu to both
- Drop TActionManager to Form1 and create Action1 in it.
- Assign menu item in Form1 Action1 and after that modify Caption (caption is shown now as bold indicating change from default value)
- Assign menu item in Form2 also Action1 (from Form1 TActionManager) and also change default caption.
- During runtime now Form1 has changed caption (different from Action1.Caption), and Form2 has identical caption to Action1.Caption although the caption should be new value as changed in step 4.