2 hours ago · Tech · hide · 0 comments

Main Menu Entry Converting an existing form from a plain TMainMenu to a TMainMenu plus a TActionList is one of those jobs that is not difficult, just tedious: For every menu item you create an action, copy the caption and the shortcut over, move the OnClick handler to the action’s OnExecute, and then assign the action back to the menu item. Do that twenty times and you start wondering why the IDE cannot do it for you. It can now, or rather GExperts can using the new Menu Items to Actions expert. It can be found in the GExperts menu and in the form designer’s context menu, and it works on the form that is currently being designed. Context Menu What it does The expert looks at the form’s TMainMenu and, if you want, at all of its TPopupMenu components, and shows you a list of the menu items it can convert. That list is pre-filtered: An item only shows up if it has a name, is not a separator, has no submenu and does not already have an action assigned. Everything else could not be…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.