How do you repeat the actions contained in the actionmanager - Delphi 2007

I use D2007 for a project that has a series of actions in the actionmanager, which are then used in actiontoolbars and menus. I also placed them in categories (for example, “File”, “Tools”, “Enter”, etc.). I would like to enable / disable individual actions or a group of actions (e.g. input) by iterating the list in manmanager. The actions property in the actionmanager returns a TContainedAction, which is not what is needed to complete my task. Does anyone know where the right collection is needed that I need to iterate over? Thanks in advance.

+3
source share
1 answer

This is due to the fact that it TContainedActiondoes not have a property Enabled. Try the following:(ActionManager1.Actions[i] as TAction).Enabled := False

+3
source

Source: https://habr.com/ru/post/1723129/


All Articles