Page 1 of 1
HOW TO - Custom Option menu
Posted: Mon Aug 05, 2013 9:49 pm
by palanolho
Greetings everyone.
I need to build a menu for my application that would look like something like this (see attachment).
what would be the best way to do it? is there any relevant documentation/tutorials around regarding this matter?
Thanks in advance for any information
- Miguel
Re: HOW TO - Custom Option menu
Posted: Tue Aug 06, 2013 9:07 am
by Mark
Hi Miguel,
For this, don't use a menu bar. Instead, create your own fake menu bar with pulldown buttons. Create stacks with your menus, using buttons as menu items, and set the menuName of each button to the name of one of the stacks.
You can set the menuName in the properties inspector or with the syntax
Code: Select all
set the menuName of button "Your Button" to stack "Your Menu Stack"
You can use buttons with icons or transparent buttons with graphic objects behind them or any other combination, as long as the buttons are in front of everything else.
Kind regards,
Mark
Re: HOW TO - Custom Option menu
Posted: Sun Aug 18, 2013 12:48 pm
by palanolho
hello again everyone.
I Have successfully created a the pull-down menus using the stack as suggested previously.
However I'm having a small issues and would like to know if anyone know how can I deal with it.
I have several OptionMenu buttons. if none of the pull-down options is being displayed at the moment and I click on one of the buttons, the corresponding pull-down options becomes visible.
however, if one of the pull-down options is already visible, if I click on another OptionMEnu button, instead of showing the other corresponding pull-down list, it only hides the pull-down list that is visible at the moment.
So, I would like to know, what could I do so that:
- When I click off the pull-down list of an OptionMenu button, the pull-down list disappears (default behaviour of livecode)
- When I click on a OptionMenu button, the corresponding drop-list menu will become visible and any other visible drop-list will become hidden
Thanks in advance for any help
Re: HOW TO - Custom Option menu
Posted: Mon Aug 19, 2013 12:35 am
by Simon
Hi palanolho,
Since I think you have made a custom dropdown menu I'd have to see your code.
Any chance you can make a small stack and post it here.
There are many ways to do what you want but it would be pointless to give you code because it's dependent on what code you already have in place.
I could say:
Code: Select all
on mouseEnter
if the bottom of grp "options" > 22 then -- this means it's visable
set the bottom of grp "opitions" to 22
end if
-- dropdown the 'other' menu
end mouseEnter
That would move one option menu up when you hovered over a different option.
Simon