AW: how to build hierachical menues?
Mark Schonewille
m.schonewille at economy-x-talk.com
Wed Oct 24 06:21:36 EDT 2012
Hi Tiemo,
A problem is that a normal option menu button won't display the submenus as expected. In those cases, I often create an option menu button (or a custom-made variant of it) and a popup button. For example, create one button with the following script:
on mouseUp
create btn
put it into myBtn
set the style of myBtn to "menu"
set the menuMode of myBtn to "popup"
set the height of myBtn to 22
set the width of myBtn to 128
set the text of myBtn to "item 1" & cr & tab & \
"sub 1" & cr & tab & "sub 2" & cr & "item 2"
hide myBtn
end mouseUp
and an option menu button without menu items but with this script:
on mouseDown
popup btn 3 at the bottomleft of me
end mouseDown
Press the first button once and then press the option menu button. It will display a menu with submenus.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com
On 24 okt 2012, at 12:03, Tiemo Hollmann TB wrote:
> Hi Mark,
> as far as I know this feature, it is "just" an optical structure in one
> menu.
> Perhaps I didn't described it good enough. What I was looking for is a
> dynamical solution where I first see only the first level and after choosing
> one item of the first level, I get (a second window with) the sub menu items
> only of the choosen item of the first level.
> Or did I misunderstood your proposal?
> Thanks
> Tiemo
More information about the use-livecode
mailing list