Option Menu option - (='.'=)

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Mariasole
Posts: 235
Joined: Tue May 07, 2013 9:38 pm

Option Menu option - (='.'=)

Post by Mariasole » Thu Aug 06, 2015 2:52 pm

Ciao a tutti! (Hello to all :P )
I am using the component "option menu."
I would like the list of choices (aka Menu Items) on the menu was passed from a variable and not manually entered. Surely it is a stupid question, like many others of my own, but I looked in the dictionary, then in the forum, then in lists.runrev.com, then in "lessons" of LC site..... but I could not find anything (or maybe I did not understand anything!).

LiveCodePigCode:

Code: Select all

put "Shery Goff|Evelyne Roan|Evelyne Roan|Josefine Villavicencio" into pItemName

on menuPick pItemName
   switch pItemName
      ....
   end switch
end menuPick
Thanks for your patience, but I am slow to learn, but I have great desire!

Mariasole
(='.'=)
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Option Menu option - (='.'=)

Post by Klaus » Thu Aug 06, 2015 2:58 pm

Hola Maria,

so you want fill a menu-button byy script?

Then you need to supply a CR delimited list of options/menuitems and SET THE TEXT OF that button!
...
put "Shery Goff" & CR & "Evelyne Roan" & "Evelyne Roan" & CR & "Josefine Villavicencio" into tMenuItems
set the text of btn "your menu button here" to tMenuItems
...

Best

Klaus

Mariasole
Posts: 235
Joined: Tue May 07, 2013 9:38 pm

Re: Option Menu option - (='.'=)

Post by Mariasole » Thu Aug 06, 2015 3:28 pm

Many thanks Klaus!
Ich habe endlich verstanden! :D
Thanks again! :!:

Mariasole
(='.'=)
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator

Post Reply