Newbie here. I’m building a simple program to get more experience with Xojo Desktop. I’m having a horrible time working with the Menu items. I read the Getting Started pages about menu items - having the videos in Spanish and NO subtitles did not help at all.
Problem: I have a “File” menu item with a sub menu “Quit” - they were supplied by the Menu Editor, I suppose. Well, when I run the program, I can click on File, but it does not show the Quit item under it. I’ve added a Menu Handler for FileQuit and put a msgbox in there but it never pops up. Both are enabled and set to visible, as defaults.
What am I doing wrong? What has to be done for my sub-menu items to show up AND to fire their handler code?
Yep - you are right - I’m on a Mac. My Msgbox fired when I clicked the Quit thingy under the name menu.
However, I added another menu item next to the File menu, created a Menu Handler for it that included a Msgbox and it doesn’t do anything. I click on “Range”, it flashes, but no message box. Arrggghhhh!
Menus themselves don’t get events. It’s the menu items that do. It looks like your RangeMenu is a menu but has no menu items. Add a menu item to it then select Window1 and choose Insert > Menu Handler. In the Inspector, choose that menu item and add your code.
Many thanks to you (and to Bill Gookin) - Got it going now. Didn’t realize that I had to build a sub-menu for my “stuff” to work. I did that, and by golly, it works!
Now that I’ve got the Menu Item and the Handler working together, I’d like to put something in the Handler to let the user select from one of three items. I know I could place a popup box on the window itself, but it would be nice to not clutter up the window with something that will be used only once, at startup, when the user selects a “range”. Isn’t there a way to have some sort of selection scheme right in the menu handler itself?