Subject: Re: How to have a hierarchical menu popup ?
Pierre-Marie CARETTE
carette.pierre-marie at wanadoo.fr
Thu Nov 14 12:27:00 EST 2002
Not THE solution, but my solution
global menuchoisi
on mouseenter
get the propMenu of the target -- the menu can change
set text of btn "Menu" of group "Menubar" to it ----btn invisible ,
group backgroundbehavior true
end mouseenter
on mousedown
put word 2 of the clickline into nl
popup btn "menu" of group "menubar"
get menuChoisi
put empty into menuChoisi
if it is not empty then send it &","&nl to the target -- nl is
added as last parameter
exit to top -- to block another popmenu down from card....
end mousedown
script in btn "menu" :
on menupick x -- x = choixA|choixAA|choixAAA|
if x is empty then exit to top
replace "|" with comma in x
get offset(comma,x)
if it is not empty then put space into char it of x --to delete the
first comma
put x into menuChoisi -- menuchoisi = choixA
choixAA,choixAAA.........
end menupick
I use a global variable "menuchoisi" but you can use a property : the
menuchoisi of this stack
Question : what solution is the best ? i don't know...
it works..
my philosophy : i prefer a pop-menu WHERE i must make a choice (on a
field, on a button) , i dislike the menubar : my mouse doesn't climb up
and down all day long
More information about the use-livecode
mailing list