caveat - I've never done any of this in real life :-)

On 08/01/2022 03:41, David Squance via use-livecode wrote:
Hi all,
I want to create a mock-up of a web site, so some menus are required. It’s 
something I’ve done very little with, and the last was years ago. I’m an 
infrequent  LC user, anyway, though have dabbled with it since it’s beginnings. 
According to the User Guide (this with version 10):

Button Menus

You can create a button menu by dragging out one of the menu controls from the tools 
palette. However,if you want to create one by script, the easiest is to create a button 
and set the style of the button to "menu". Next, you can set the menuMode of 
the button to the appropriate menu type. You can either set the menuMode in a handler, or 
use the Type menu in the button's property inspector to set the menu type.


However, if I create a button, menu is not an option in the list of styles.

I think you mean "[...] menu is not an option in the list of styles in the dictionary".

But in a script (I did it in the message box), you can do

set the style of button "bbb" to "menu"

and it does change the style, and subsequent 'put the style of btn "bbb"' does say 'menu', so I think it has worked.

And what do the “menu controls” in the tools palette look like?
Sorry, no idea.

I’m sure I’m missing something pretty basic, but I am definitely missing it. I 
guess I can copy and paste a menu button from an old stack, and change its 
attributes, or work around it with a bunch of hidden buttons, but there must be 
a more streamlined approach than that.

afaict, you can indeed do what you need in a script - set the style, etc. - and once you've done that, you then get different options in the Property Inspector.

Alex.


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to