Page 1 of 1
Option Menu (dropdown-list)
Posted: Wed Mar 28, 2018 4:32 am
by jwtea
Hello,
I got a option menu and when i click on certain choice in the option menu i want a certain value to be display
in a field.
PS: Can i know what is the livecode variable of option 1 value?
Can i know what i should type in the option menu to allow this function to work?
Thanks!
Re: Option Menu (dropdown-list)
Posted: Wed Mar 28, 2018 8:01 am
by thatkeith
Have you looked at the menuPick message? That's what is triggered when someone picks an item from a menu.
Code: Select all
on menuPick pChosenItem -- in a pulldown menu
put pChosenItem into field 1
end menuPick
Or if you want to respond to the selected menu item rather than simply put it into a field, something like this might help:
Code: Select all
on menuPick pChosenItem -- in a pulldown menu
switch pChosenItem
case "Jump"
put "How high?" into field 1
and so on. Complete the switch/case structure as required, of course.
Re: Option Menu (dropdown-list)
Posted: Wed Mar 28, 2018 8:56 am
by jwtea
Thanks thatkeith,
I put what you told me to and it work perfectly!!
Thanks for your time and effort , appreciated!

Re: Option Menu (dropdown-list)
Posted: Wed Mar 28, 2018 3:37 pm
by dunbarx
What Keith said.
Now go to the dictionary and read about "menuHistory".
You will love it.
Craig Newman