Each stack can and probably should have it’s own menu bar. I don’t believe menu groups are card specific, although you can certainly define the stack menu on the fly.
Yes it is just a group of popup style buttons. On MacOS they will arrange themselves based upon the layer but in Windows they will appear according to their actual location. Each menu button typically has it’s own script, and the actions are triggered by a menuPick handler with a parameter which will contain the item the user selected. I haven’t tried, but I don’t think pallets can have their own stack menus for obvious reasons. I don’t think pallets can become the top stack. They are also a bit tricky to troubleshoot, like modal dialogs are. Bob S > On Nov 26, 2025, at 11:10 AM, Ben Rubinstein via use-livecode > <[email protected]> wrote: > > It's a _very_ long time since I've tried to make a proper desktop app. Please > help me get my mind back into how menubars work. > > Per the dictionary, the value of `the defaultMenubar` is a group reference, > and the example given is > set the defaultMenubar to the long ID of group 1 of stack "Menubars" > > That makes sense, as it's always "reachable" as long as the owning stack is > in memory. > > But the dictionary says that `the menubar` is just the _name_ of a group. > > So is that interpreted on the current card? And does that mean the menubar > group must be every card of the stack - presumably with backgroundBehavior > set? > > And the dictionary also says that the menubar takes effect "when a stack is > the active window". How does this interact with windows that has been opened > with the 'palette' command? Do they reset the menubar? > > And if we want to use a separate sub-stack to hold all our menus - as sort of > implied by the example given for `the defaultMenubar` - do we need to abandon > use of 'the menubar', and instead explicitly change `the defaultMenubar` as > different stacks become active? > > TIA for any tips and advice! > > Ben > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
