About the author
Are you required to develop an Open Tools API plugin for Delphi 8?
If so, you may be required to add a menu item to the Delphi 8 menu. Before adding a menu item to the Delphi 8 menu, you are required to know the existing name of a Delphi 8 menu item.
As the author of probably the world's first plugin (outside of Borland) for Delphi 8, I had to figure out all the menu item names, in order to insert an item into the Delphi 8 menu.
For the first time, anywhere in the world, the following code fragment shows you how to walk the list of menu items in Delphi 8, and list them out.
MainMenu := BorlandIDE.GetServices(typeof(IOTAMainMenuService)); MenuItem := MainMenu.GetFirstMenuItem; while MenuItem<>nil do begin SubMenus(MenuItem); MenuItem := MenuItem.NextMenuItem; end; procedure SubMenus(MenuItem...) ... ... ChildMenuItem: ... begin for I := 0 to 99 do begin ChildMenuItem := MenuItem.ChildMenuItem(I); if ChildMenuItem = nil then Break; Show MenuItem in TextBox.... end; end;
Some Delphi 8 users wished Borland could have published the following information, but as of the date/time of this article, it remains unpublished, and undocumented.
Undocumented Delphi 8 menu item names
Name: “FileMenu” Caption: “&File”Parent “FileMenu” Name: “New1” Caption: “&New”Parent “FileMenu” Name: “FileOpenItem” Caption: “&Open...”Parent “FileMenu” Name: “FileOpenProjectItem” Caption: “Open Pro&ject...”Parent “FileMenu” Name: “FileClosedFilesItem” Caption: “&Reopen”Parent “FileMenu” Name: “FileSaveSeparater” Caption: “-”Parent “FileMenu” Name: “FileSaveItem” Caption: “&Save”Parent “FileMenu” Name: “FileSaveAsItem” Caption: “Save &As...”Parent “FileMenu” Name: “FileSaveProjectAs” Caption: “Sav&e Project As...”Parent “FileMenu” Name: “FileSaveAllItem” Caption: “Sa&ve All”Parent “FileMenu” Name: “FileCloseItem” Caption: “&Close”Parent “FileMenu” Name: “FileCloseAllItem” Caption: “C&lose All”Parent “FileMenu” Name: “FileMenuSeparator” Caption: “-”Parent “FileMenu” Name: “FileUseUnitItem” Caption: “&Use Unit...”Parent “FileMenu” Name: “” Caption: “-”Parent “FileMenu” Name: “FilePrintItem” Caption: “&Print...”Parent “FileMenu” Name: “” Caption: “-”Parent “FileMenu” Name: “FileExitItem” Caption: “E&xit"
Name: “EditMenu” Caption: “&Edit”Parent “EditMenu” Name: “EditUndoItem” Caption: “&Undo”Parent “EditMenu” Name: “EditRedoItem” Caption: “&Redo”Parent “EditMenu” Name: “” Caption: “-”Parent “EditMenu” Name: “EditCutItem” Caption: “Cu&t”Parent “EditMenu” Name: “EditCopyItem” Caption: “&Copy”Parent “EditMenu” Name: “EditPasteItem” Caption: “&Paste”Parent “EditMenu” Name: “EditDeleteItem” Caption: “&Delete”Parent “EditMenu” Name: “EditSelectAll” Caption: “Se&lect All”Parent “EditMenu” Name: “” Caption: “-”Parent “EditMenu” Name: “EditAlignGridItem” Caption: “Align to &Grid”Parent “EditMenu” Name: “EditFrontItem” Caption: “Bring to &Front”Parent “EditMenu” Name: “EditBackItem” Caption: “Send to &Back”Parent “EditMenu” Name: “EditAlignItem” Caption: “&Align...”Parent “EditMenu” Name: “EditSizeItem” Caption: “&Size...”Parent “EditMenu” Name: “EditScaleItem” Caption: “Scal&e...”Parent “EditMenu” Name: “EditTabOrderItem” Caption: “Tab &Order...”Parent “EditMenu” Name: “EditCreationOrderItem” Caption: “Creatio&n Order...”Parent “EditMenu” Name: “EditFlipChildrenItem” Caption: “Flip C&hildren”Parent “EditMenu” Name: “EditLockControlsItem” Caption: “Loc&k Controls”Parent “EditMenu” Name: “HTMLTidySubmenuItem” Caption: “HTML Tidy”
Name: “SearchMenu” Caption: “&Search”Parent “SearchMenu” Name: “SearchFindItem” Caption: “&Find...”Parent “SearchMenu” Name: “SearchFileFindItem” Caption: “Fin&d in Files...”Parent “SearchMenu” Name: “SearchReplaceItem” Caption: “&Replace...”Parent “SearchMenu” Name: “SearchAgainItem” Caption: “&Search Again”Parent “SearchMenu” Name: “SearchIncrementalItem” Caption: “&Incremental Search”Parent “SearchMenu” Name: “” Caption: “-”Parent “SearchMenu” Name: “SearchGoToItem” Caption: “&Go to Line Number...”Parent “SearchMenu” Name: “SearchGotoAddressItem” Caption: “Goto Addr&ess”
Name: “ViewsMenu” Caption: “&View”Parent “ViewsMenu” Name: “ViewObjInspItem” Caption: “&Object Inspector”Parent “ViewsMenu” Name: “ViewDebugItem” Caption: “&Debug Windows”Parent “ViewsMenu” Name: “ViewDesktopsMenu” Caption: “Des&ktops”Parent “ViewsMenu” Name: “mnuViewDataExplorer” Caption: “Data Explorer”Parent “ViewsMenu” Name: “ViewWelcomePageItem” Caption: “&Welcome Page”Parent “ViewsMenu” Name: “EditWindowSeparator” Caption: “-”Parent “ViewsMenu” Name: “ViewNewEditorItem” Caption: “New &Edit Window”Parent “ViewsMenu” Name: “DockEditWindow1” Caption: “Dock Edit Window”Parent “ViewsMenu” Name: “” Caption: “-”Parent “ViewsMenu” Name: “HistoryMenuItem” Caption: “History”Parent “ViewsMenu” Name: “HistorySeparator” Caption: “-”Parent “ViewsMenu” Name: “ViewToolbarsItem” Caption: “Toolba&rs”Parent “ViewsMenu” Name: “ViewNextWindowItem” Caption: “Next Window”
Name: “ProjectMenu” Caption: “&Project”Parent “ProjectMenu” Name: “ProjectAddItem” Caption: “&Add to Project...”Parent “ProjectMenu” Name: “ProjectRemoveItem” Caption: “&Remove fromProject...”Parent “ProjectMenu” Name: “ProjectAddRepositoryItem” Caption: “Add&to Repository...”Parent “ProjectMenu” Name: “ViewPrjSourceItem” Caption: “&View Source”Parent “ProjectMenu” Name: “N2” Caption: “-”Parent “ProjectMenu” Name: “ProjectAddNewProjectItem” Caption: “Add&New Project...”Parent “ProjectMenu” Name: “ProjectAddExistingProjectItem” Caption:"Add E&xisting Project...”Parent “ProjectMenu” Name: “ProjectCompileSeparator” Caption: “-”Parent “ProjectMenu” Name: “ProjectCompileItem” Caption: “&Compile”Parent “ProjectMenu” Name: “ProjectBuildItem” Caption: “&Build”Parent “ProjectMenu” Name: “ProjectSyntaxItem” Caption: “&Syntaxcheck”Parent “ProjectMenu” Name: “ProjectInformationItem” Caption:"&Information...”Parent “ProjectMenu” Name: “ProjectClearUnitCacheItem” Caption: “ClearUnit Cache”Parent “ProjectMenu” Name: “N1” Caption: “-”Parent “ProjectMenu” Name: “ProjectCompileAllItem” Caption: “Compil&eAll Projects”Parent “ProjectMenu” Name: “ProjectBuildAllItem” Caption: “B&uild AllProjects”Parent “ProjectMenu” Name: “ProjectSeparator2” Caption: “-”Parent “ProjectMenu” Name: “ProjectDependenciesItem” Caption: “&Dependencies...”Parent “ProjectMenu” Name: “ProjectOptionsItem” Caption: “&Options...”
Name: “RunMenu” Caption: “&Run”Parent “RunMenu” Name: “RunRunItem” Caption: “&Run”Parent “RunMenu” Name: “RunRunNoDebugItem” Caption: “Run Without &Debugging”Parent “RunMenu” Name: “RunParametersItem” Caption: “&Parameters...”Parent “RunMenu” Name: “RunParametersSeparator” Caption: “-”Parent “RunMenu” Name: “RunStepOverItem” Caption: “&Step Over”Parent “RunMenu” Name: “RunTraceIntoItem” Caption: “&Trace Into”Parent “RunMenu” Name: “RunTraceToSourceItem” Caption: “Trace to &Next Source Line”Parent “RunMenu” Name: “RunGotoCursorItem” Caption: “Run to &Cursor”Parent “RunMenu” Name: “RunShowCSIPItem” Caption: “S&how Execution Point”Parent “RunMenu” Name: “RunPauseItem” Caption: “Pro&gram Pause”Parent “RunMenu” Name: “RunResetItem” Caption: “Program R&eset”Parent “RunMenu” Name: “RunDetachItem” Caption: “&Detach From Program”Parent “RunMenu” Name: “RunInspectSeparator” Caption: “-”Parent “RunMenu” Name: “RunEvalModItem” Caption: “E&valuate/Modify...”Parent “RunMenu” Name: “RunAddWatchItem” Caption: “Add &Watch...”Parent “RunMenu” Name: “RunAddBreakItem” Caption: “Add &Breakpoint"
Name: “ComponentMenu” Caption: “&Component”Parent “ComponentMenu” Name: “ComponentPaletteItem” Caption: “actnCompDummy”
Name: “Map” Caption: “Team”Parent “Map” Name: “CheckOutFiles” Caption: “Check Out Files...”Parent “Map” Name: “CheckInFiles” Caption: “Check In Files...”Parent “Map” Name: “AddFiles” Caption: “Add Files...”Parent “Map” Name: “RemoveFiles” Caption: “Remove Files...”Parent “Map” Name: “UndoCheckOutFiles” Caption: “Undo Check Out Files...”Parent “Map” Name: “MainSep2” Caption: “-”Parent “Map” Name: “CommitBrowser” Caption: “Commit Browser...”Parent “Map” Name: “PlaceProject” Caption: “Place Project Into SourceControl...”Parent “Map” Name: “PullProject” Caption: “Pull Project from Source Control...”Parent “Map” Name: “MainSep3” Caption: “-”Parent “Map” Name: “ShowDifferences1” Caption: “Show Differences...”Parent “Map” Name: “GetFiles” Caption: “Get Latest Version”Parent “Map” Name: “ShowHistory1” Caption: “Show History...”Parent “Map” Name: “MainSep4” Caption: “-”Parent “Map” Name: “Messages1” Caption: “Messages”Parent “Map” Name: “RunSccApplication1” Caption: “Run Scc Application”
Name: “ToolsMenu” Caption: “&Tools”Parent “ToolsMenu” Name: “ToolsOptionsItem” Caption: “&Options...”Parent “ToolsMenu” Name: “ToolsGalleryItem” Caption: “&Repository...”Parent “ToolsMenu” Name: “IDEToolsItem” Caption: “Build Tools...”Parent “ToolsMenu” Name: “N3” Caption: “-”Parent “ToolsMenu” Name: “ToolsToolsItem” Caption: “Configure &Tools...”
Name: “HelpMenu” Caption: “&Help”Parent “HelpMenu” Name: “HelpContentsItem” Caption: “C# Builder Help”Parent “HelpMenu” Name: “HelpDelphiToolsItem” Caption: “Delphi &Tools”Parent “HelpMenu” Name: “” Caption: “-”Parent “HelpMenu” Name: “HelpInprisePage” Caption: “&Borland Home Page”Parent “HelpMenu” Name: “HelpCommunityPage” Caption: “B&orland Developer Network”Parent “HelpMenu” Name: “HelpDelphiPage” Caption: “Delphi Home &Page”Parent “HelpMenu” Name: “HelpDevSupportPage” Caption: “Delphi Developer &Support”Parent “HelpMenu” Name: “HelpProgGuideSeparater” Caption: “-”
Continued discussion of undocumented Delphi 8 Property Access Specifiers, and other ways of adding and removing delegates / events handlers, including clearing the list of all the delegates / event handlers.
This article discusses the new Delphi 8 property access specifiers.
A method pointer is now the same as a global procedure, ie, procedure of object = procedure.