Menu

#152 Expert to generate actions for menu items

open
None
5
2022-02-14
2022-02-14
No

It currently is a major pain to convert a form from using a TMainMenu only to a TMainMenu plus a TActionList. It should be possible to create an expert that

  • Looks for the form's main menu (optionally for any TPopupMenu on the form)
  • Optionally gives the user a list of menu items to choose from. This list should be pre-filtered in a sensible way, e.g. only contain TMenuItems that
    • Do not have submenus
    • Do not have an action assigned to them
  • For the selected TMenuItems
    • Generates new TActions in an existing (or if there is none, in a new) TActionList
    • The names of the TActions should be based on the names of the TMenuItems, possibly taking the settings of the Rename Components expert into account
    • Assigns the Caption and OnClick event of the TMenuItem to the new TAction
    • Assigns the new TAction to the Action property of the TMenuItem

Discussion


Log in to post a comment.

MongoDB Logo MongoDB