Apparently MenuBar is considered by Xojo as a MenuItem, but it has no name or text visible. It is possible to set those values, though. No idea what one could do with that…
They are present, because MenuBar is a subclass of MenuItem. The Text property has to be empty as there is no text to show for the menu bar. The Name property could return the “MenuBar1”, but I never needed that. If you need it, you could set it (it is a read-write property).
I was thinking that the MenuBar have to have a reference: so one who have many MenuBars can call them. Now, the real question is: Can we have many different MenuBars in an application ?
Yes, Michel: I forgot to set the Code to be looking like Code Where goes my head at that moment ? I do not know !!
The answer is yes. You can have as many menu bars as you want and switch them at will. That said, if this is alright on Windows as menus are attached to each window, Apple HIG recommend to keep the same menu, and simply enable or disable options.
[quote=196404:@Emile Schwarz]Time ellapsed, but AppleWorks (the Mac OS version) had “contextual” menus depending on the module you were working on.
That said, I do not know how they do that (but I suspect they used one MenuBar for each module).[/quote]
It can make sense to have different menus in a Word Processor, a Spreadsheet and a Database.
As I said, it is easy to do with several menu bars, but current HIG discourage it. And all so very often Apple apps do things that are frowned upon in the HIG. That said nothing prevents you from doing the same.
In the current version of Apple office applications, the problem has been solved by simply having modules replaced by separate applications : Pages, Numbers, etc.