Jeffrey Massung wrote:

> I have a couple pop-up button menus that I create on-the-fly
> (in mouseDown) based on what's going on. They also act as combo
> box selections, where one of the items is "current," with "!r"
> in front of it.
>
> Is it possible for me to somehow tell the popup to auto-magically
> scroll down to the current selection instead of always reopening
> the menu at the top?

To set the current selection of an option control you set its menuHistory property. But note that setting that property also trigger's the button's menuPick handler, which can be problematic in some circumstances.

To counter this, Ken Ray and I have adopted a habit of using a handler like this one to set an option control's current choice:

on SetOption pBtnName, pNum
   lock messages
   set the menuHistory of btn pBtnName to pNum
   unlock messages
end SetOption

It would be ideal if the language provided a native command for this, but tucking this into your standard library at least gets the job down for now.

--
 Richard Gaskin
 Fourth World
 Rev training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: http://www.revjournal.com
 revJournal blog: http://revjournal.com/blog.irv
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to