

The same code also displays the menu when placed in the “Open” event handler of the same button. No longer have reference to the origin.īase.Append( new MenuItem( “Paste” ) ) '1īase.Append( new MenuItem( “Select All” ) ) '2īase.Append( new MenuItem( “Clear” ) ) '3īase.Append( new MenuItem( MenuItem.TextSeparator ) ) '4īase.Append( new MenuItem( “Find Next” ) ) '6 This code was copied from RB or some other forum. The Inspector displays the properties for the selected menu or menu item.Added the following code in the “Action” event handler of a button and the menu is displayed (Windows 7, Xojo 2014r2.1) when the button is clicked. Use this command to convert the selected menu item to a top-level menu.

The platform icons on the toolbar allow you to see how the menu looks on Windows, MacOS and Linux.Ĭreates a new menu item under a selected top-level menu.Ĭreates a separator item below the selected menu item.Ĭreates a submenu below the selected menu item. Refer to Desktop Menus for more information on how to create and design menus.

Simply click on the menu in the Menu Editor and then use the keyboard commands to cut/copy/paste or delete menus. You can also use Cut/Copy/Paste to move and copy menu items to other areas of the menu. The toolbar has functions for adding new menus and menu items. You can drag menus around to rearrange them or move them to entirely new menus. Similarly, the Edit menu is populated with Undo, Cut, Copy, Paste, Delete, and Select All menu items. You don’t need to modify or add to the menu item’s properties in order to enable it. The properties of the Quit/Exit menu item are supplied, so that the menu item works automatically. Because, like nearly all of the Xojo framework, the DesktopPopupMenu is zero-based, this value will be 1 less than the RowCount. The File menu has one menu item, Exit (on Windows) or Quit (on macOS and Linux). This example displays the value of the last row added to the popup menu: The number of the last row of the DesktopPopupMenu. The default menubar for a Desktop app, MainMenuBar, includes File and Edit menus and the standard File and Edit menu items. Hi, Is there a way to either check if a MsgBox is on screen, OR, check if more than 1 window (the main window) is open I have my main window containing a ListBox, and I want to prevent the contextual menu from showing if any MsgBoxes or other windows are open. The Menu Editor can only be used with Desktop projects. You can use the default or create additional menu bars (using Insert on the toolbar or menu) for use with specific windows by assigning the menu bar to the Menu Bar property using the Inspector for the Window. The standard Desktop app template includes a menu bar that is used as the default menu bar for the entire app (MainMenuBar). The Menu editor makes adding menu bars, menus, and menu items to your desktop projects easy.
