How to get the selected from a option menu

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
ivaho
Posts: 37
Joined: Tue Feb 14, 2012 2:19 pm

How to get the selected from a option menu

Post by ivaho » Wed May 23, 2012 2:03 pm

Hi,

I have a option menu with some options.
How to get the selected option into _selected

Thanks
Ivo

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

Re: How to get the selected from a option menu

Post by Klaus » Wed May 23, 2012 2:31 pm

Dag Ivo,

one way is to have a "menupick" handler in any "menu" button:

Code: Select all

on menupick tMenuItem
  ## tMenuItem is the menuitem that the user has selected
   switch ctMenuItem
     case "whatever"
      ## do whatever---
     break
    case "another menutem..."
      ## ...
    break
    ## etc...
   end switch
end menupick
Best

Klaus

Post Reply