StrataFrame Forum

StrataFlix: Copying ActionLinkMenu Items to new forms

http://forum.strataframe.net/Topic18313.aspx

By Edhy Rijo - 8/4/2008

Hi,

Implementing the ActionLinkMenu items used in StrataFlix, there are some common actions items used in most forms, is there a way to copy these items to new forms, or should I add the items to a template form class I created?

So far, when I copy one ActionLinkMenu item to the new form, it is not added to the form's ActionItems collection, only ActionLinkMenu items created from the Property page will be manage trough the form's ActionItems collection property.

By Dustin Taylor - 8/4/2008

I'd recommend adding those common items to the base form rather than copying them or adding them to a template, actually. Smile



Technically the action is a component, so when you copy it over it won't be added as an item within the form's action collection. To do it manually, you have to go into the form's designer file and add a Me.ActionItems.Add(yourActionItem) call once you copy the action across.



Adding them to a template would work, but the cleanest approach would be to add those common items to your base form and then add a property to turn them on or off when needed. Check out the code of the StrataFlix ApplicationBaseForm to see how to do that. We do it with the Save and Undo actions in there



Hope it helps BigGrin
By Edhy Rijo - 8/4/2008

Thanks Dustin, will do it at the base form level.  So far I tested with the template which is very nice, but to be safe will check the base form route with a flag property to turn it On/Off.