What's On The Menu?

Paul Hibbert lc at pbh.on-rev.com
Sat Dec 29 23:53:29 EST 2012


On 2012-12-29, at 5:52 PM, Peter Haworth wrote:

> When you click on an option menu, the last choice you made from it appears
> under the cursor and is highlighted.  That doesn't happen with pulldown
> menus and so far I haven't found a way to make it happen.  Jujst a
> convenience and it doesn't really matter in my case since there's a fairly
> short list of items in the menu but it's very convenient to have that
> happen in a long list of menu items.
> Pete
> lcSQL Software <http://www.lcsql.com>

Pete,

AFAIK you can't auto highlight the previous menu choice for a pulldown menu (although I may be wrong), but you can add a checkmark to the current choice.

If its any use to you, try this slightly modified script from the LC Resources…

on menuPick pItemName
   
     ## Add a checkmark to the current choice
   put the menuHistory of me into tChoice
   put the uCheckedLine of me into tChecked
   replace "!c" with empty in line tChecked of me
   put "!c" before line tChoice of me
   set the uCheckedLine of me to tChoice
   
     ## Do something with the current choice…
   answer "You chose" && quote & pItemName & quote & "."
   
end menuPick

Paul



More information about the use-livecode mailing list