Menu Problem!

Ken Ray kray at sonsothunder.com
Wed Aug 17 12:25:11 EDT 2005


On 8/17/05 9:49 AM, "David Burgun" <dburgun at dsl.pipex.com> wrote:

> Hi,
> 
> I have a pop up menu that has two values, call them A and B. In the
> preOpenStack handler I want to set the menu back to A so I tried the
> following:
> 
> send "menuPick A" to button "myButton"

Actually, what you want to do is to set the "menuHistory" to a number
corresponding to the menu item you want selected. So if the menu displays
"A" as the first item, then "B", you want to do:

  set the menuHistory of button "myButton" to 1

However keep in mind that this does the same thing as actually *selecting*
the menu item, so if you want to reset the menu, but *not* have it take
effect, you need to wrap the command in "lock messages", like this:

  lock messages
  set the menuHistory of button "myButton" to 1
  unlock messages

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com





More information about the use-livecode mailing list