Create a toolbar
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Create a toolbar
Hi Mag,
ah, idea!
Open that stack and enter this in the messagebox:
put the editmenus of stack "your stack here"
If you get TRUE then set it to FALSE and vice vera:
set the editmenus of stack "your stack here" to TRUE ## or FALSE
This should cure the strange behaviour.
Best
Klaus
ah, idea!
Open that stack and enter this in the messagebox:
put the editmenus of stack "your stack here"
If you get TRUE then set it to FALSE and vice vera:
set the editmenus of stack "your stack here" to TRUE ## or FALSE
This should cure the strange behaviour.
Best
Klaus
Re: Create a toolbar
Hi Klaus, the value is false, I tried to change this value but it continues to think that the menubar are present in the window. Now I have a question: is the menu builder a reliable tool or it's better to create all by code?
PS
I tried to change the name of the menu group and it's disappeared. Fortunately I had a backup project.
PS
I tried to change the name of the menu group and it's disappeared. Fortunately I had a backup project.
Re: Create a toolbar
I think the menu builder is okay to use so long as you do not change anything afterwards, otherwise just roll your own..
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Create a toolbar
Mag,
Your menu is still there but has probably scrolled out of view (I assume you're on a Mac, otherwise you'd see it.) This is how menus work on Mac. When you want the stack to scroll the menu area back into view so you can edit or see it, do as Klaus suggested and set the editmenus of the stack to true in the message box:
set the editmenus of this stack to true
Menu Builder is reliable for the most part. I generally use it to set up the menu structure and the skeleton scripts. After that I do any other editing in the property inspector. But you can continue to use Menu Builder to edit if you make sure you are working on the correct menu group. You really don't want to assign two groups as the menu in a stack, that will confuse things. Click the Edit button and choose the existing menu group to edit it. You can toggle the visibility of the group from there too, uncheck the button that sets the group as the stack menubar. Remember to set it back again later.
I have a tutorial about how menus work in LiveCode. Once you understand it the scrolling makes more sense:
http://www.hyperactivesw.com/mctutorial ... Menus.html
Your menu is still there but has probably scrolled out of view (I assume you're on a Mac, otherwise you'd see it.) This is how menus work on Mac. When you want the stack to scroll the menu area back into view so you can edit or see it, do as Klaus suggested and set the editmenus of the stack to true in the message box:
set the editmenus of this stack to true
Menu Builder is reliable for the most part. I generally use it to set up the menu structure and the skeleton scripts. After that I do any other editing in the property inspector. But you can continue to use Menu Builder to edit if you make sure you are working on the correct menu group. You really don't want to assign two groups as the menu in a stack, that will confuse things. Click the Edit button and choose the existing menu group to edit it. You can toggle the visibility of the group from there too, uncheck the button that sets the group as the stack menubar. Remember to set it back again later.
I have a tutorial about how menus work in LiveCode. Once you understand it the scrolling makes more sense:
http://www.hyperactivesw.com/mctutorial ... Menus.html
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Create a toolbar
Thank you shaosean and jacque.
Jacque your tutorial is really, really well done, I learnt a lot about the menu handling in LiveCode, a big thank you.
Jacque your tutorial is really, really well done, I learnt a lot about the menu handling in LiveCode, a big thank you.
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Create a toolbar
Thanks, I'm glad it was useful. You can see how old the tutorials are, the screen shots are from Mac OS 9. When LiveCode releases the open source version I'm going to have to rewrite everything.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Create a toolbar
I can't find a way to have Preferences menuitem to work. In the Menu Builder is not present any Preferences menu item, and in the standalone you can see one correctly located on the application menu, but it's disabled. I admit that I find a bit frustrating the handling of menu in LiveCode
-
- VIP Livecode Opensource Backer
- Posts: 129
- Joined: Sun Feb 20, 2011 4:26 pm
- Location: Vancouver Island, BC, Canada. ex.UK
- Contact:
Re: Create a toolbar
Mag,
The default Menubar created by the Menu Builder has a Preferences item at the end of the Edit menu, see attachment.
If you leave this in place (or add one to the end of an existing Edit Menu) and add your scripts to the MenuBar>Edit button the system will automatically move the Preferences menu item over to the Apple Menu on a Mac, the same happens with the About menu item under the Help menu.
HTH
Paul
The default Menubar created by the Menu Builder has a Preferences item at the end of the Edit menu, see attachment.
If you leave this in place (or add one to the end of an existing Edit Menu) and add your scripts to the MenuBar>Edit button the system will automatically move the Preferences menu item over to the Apple Menu on a Mac, the same happens with the About menu item under the Help menu.
HTH
Paul
Re: Create a toolbar
Thank you Paul, implemented as you suggested, all works fine now.
Re: Create a toolbar
Can't find a way to detect whether we are under retina or non-retina display under OS X. in iOS I use this
But it seems to me that there is not a counterpart on desktop...
Code: Select all
if iphoneDeviceScale() is "2" then
Re: Create a toolbar
BTW, the icon that appears in the box is clickable. Does anyone know a way to make it not clickable?