Menus across the entire stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Menus across the entire stack
Hi Guys,
I've built my app, which comprises of a main stack and then multiple stacks underneath. I've created a menu on the top mainstack and I wanted it to be applied to all the cards in my application. On a Mac it seems to work ok, I think from my limited testing, but on a Windows environment, the menu is on top of the card instead of the menubar. When I switch over to another card, I lose the menu as its only applied to the main card. Am I missing something? Do the menus only work on cards on a Windows environment (testing on Win 10), or can I have them up in the toolbars like you can with the Mac application?
Many thanks as always
Jalz
I've built my app, which comprises of a main stack and then multiple stacks underneath. I've created a menu on the top mainstack and I wanted it to be applied to all the cards in my application. On a Mac it seems to work ok, I think from my limited testing, but on a Windows environment, the menu is on top of the card instead of the menubar. When I switch over to another card, I lose the menu as its only applied to the main card. Am I missing something? Do the menus only work on cards on a Windows environment (testing on Win 10), or can I have them up in the toolbars like you can with the Mac application?
Many thanks as always
Jalz
Re: Menus across the entire stack
Hi.
Isn't this how Windows (and Linux) works? I am a Mac guy, but for LC to be able to support all platforms, the group of buttons that actually comprise the menubar are always placed at the top of the card window, and a special action hides them for Mac, placing that group in the standard menubar.
If the group has its background behavior set to "true", it will appear on all cards. The point is that these controls are just groups of buttons with certain properties, and not a separate type of control, like HC had.
Craig Newman
Isn't this how Windows (and Linux) works? I am a Mac guy, but for LC to be able to support all platforms, the group of buttons that actually comprise the menubar are always placed at the top of the card window, and a special action hides them for Mac, placing that group in the standard menubar.
If the group has its background behavior set to "true", it will appear on all cards. The point is that these controls are just groups of buttons with certain properties, and not a separate type of control, like HC had.
Craig Newman
Re: Menus across the entire stack
Hi Craig,
I've looked at other applications, like FileMaker or Office for instance. They seem to have an application environment which contain the menus and then windows within this environment. I guess the stack is the application environment and each window that is loaded is a card. I suppose I am trying to mimic the same kind of functionality with my app but because I have many substacks I guess I am going to have to have a menu on each substack. In hindsight I should have created one stack and many cards within that to get the look and feel that I wanted.
Now that I've created the app with many substacks and I have defined a menu on the main stack, anyone advise me if I can can apply the same menu from the main stack to all the other stacks or do I need to recreate the menu for each stack? I was hoping something like this would work
set menu of this stack to "menu1" of stack "main"
Thanks
Jalz
I've looked at other applications, like FileMaker or Office for instance. They seem to have an application environment which contain the menus and then windows within this environment. I guess the stack is the application environment and each window that is loaded is a card. I suppose I am trying to mimic the same kind of functionality with my app but because I have many substacks I guess I am going to have to have a menu on each substack. In hindsight I should have created one stack and many cards within that to get the look and feel that I wanted.
Now that I've created the app with many substacks and I have defined a menu on the main stack, anyone advise me if I can can apply the same menu from the main stack to all the other stacks or do I need to recreate the menu for each stack? I was hoping something like this would work
set menu of this stack to "menu1" of stack "main"
Thanks
Jalz
Re: Menus across the entire stack
Almost there:
That works for Mac. On Windows you need to place the menubar on each card. Since menus are a group, use group syntax:
If the stack doesn't have room for the menubar you'll need to make it taller and push all the objects on each card down to leave space at the top. If that's something you need to do, let us know and I'll give you a link to an automation handler.
Code: Select all
set the menubar of this stack to "menu1" of stack "main"
Code: Select all
repeat with x =1 to the number of cards
place group "menu1" onto card x
end repeat
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Menus across the entire stack
Jacque.
I just want to make sure I am not missing some aspect of Windows (ptui).
Craig
Unless the group was already created, of course, and had to be placed on additional cards.If the group has its background behavior set to "true", it will appear on all cards.
I just want to make sure I am not missing some aspect of Windows (ptui).
Craig
Re: Menus across the entire stack
Right. As far as placement is concerned, menu groups behave like any other group. Since the OP didn't have the group on the existing cards yet, it has to be placed. You can place a group that exists in another stack as long as the stack is in the object hierarchy, which a mainstack would be. It might be safer to copy the group to each substack first, I suppose.Unless the group was already created, of course, and had to be placed on additional cards.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Menus across the entire stack
Thanks Guys,
Most useful, I've copied the menu group over from the main stack to one of my other stacks. That seems to work
I guess whenever I make a change to the menu structure in the main stack, I will need to copy and paste buttons and groups back to the other stacks?
Jalz
Most useful, I've copied the menu group over from the main stack to one of my other stacks. That seems to work

I guess whenever I make a change to the menu structure in the main stack, I will need to copy and paste buttons and groups back to the other stacks?
Jalz
Re: Menus across the entire stack
The advantage of placing the group that lives in the mainstack is that you don't have to maintain separate copies. Otherwise, if you put a copy into every stack, then you do need to update each instance of the group if it changes.jalz wrote:I guess whenever I make a change to the menu structure in the main stack, I will need to copy and paste buttons and groups back to the other stacks?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Menus across the entire stack
Thanks Jacque,
I tried the placing the group, but because my cards are in a substack below the main stack no group gets placed on the card. I tried placing the menu group on another card in the main stack and that seemed to work fine. I don't think you can place groups in cards that are in another stack even though they may be below the stack the original group is in, unless I'm doing someone wrong as usual.
Jalz
I tried the placing the group, but because my cards are in a substack below the main stack no group gets placed on the card. I tried placing the menu group on another card in the main stack and that seemed to work fine. I don't think you can place groups in cards that are in another stack even though they may be below the stack the original group is in, unless I'm doing someone wrong as usual.
Jalz
Re: Menus across the entire stack
I think you are correct. The "place" command seems to only be comfortable within a single stack.
You can always embellish this, though:
Or something like that, and you can certainly, once in the other stack, place the group onto any or all cards there.
Craig Newman
You can always embellish this, though:
Code: Select all
on mouseUp
copy group yourGroup
go stack "yourOtherStack"
paste
go back
end mouseUp
Craig Newman
Re: Menus across the entire stack
Yes, apparently you're both right. I had a setup in the past where I used a group across stacks but it no longer seems to work. Sorry for the misdirection.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Menus across the entire stack
HI Guys,
Thank you both, no need to apologise Jacque, you've been most helpful. I'm learning by trying new things out I now know what the place group command does
. Just copied and pasted the group as per Craigs instruction, seems to work, pity they don't work as an inherited menu, but non the less its just a little more maintainenece on my part.
Thanks
Jalz
Thank you both, no need to apologise Jacque, you've been most helpful. I'm learning by trying new things out I now know what the place group command does

Thanks
Jalz