ANN: PopUp Menu with Key-Combination Shortcuts
irog at mac.com
Thu Apr 22 13:58:13 CDT 2010
Thanks very much, I'll change it! Forgive me for asking, but should we refer to you as TheSlug?
On Apr 22, 2010, at 1:01 AM, use-revolution-request at lists.runrev.com wrote:
> Hi Roger,
> Interesting demo, thanks for sharing ;)
> Instead of the repeat loop to look for the correct item:
> on controlKeyDown theKey
> set itemdelimiter to tab
> repeat for the number of lines of btn "popupMenu" -- Menu items are
> the "lines" of the Popup btn
> add 1 to theNum
> if last char of line theNum of btn "popupMenu" = theKey then \
> put item 1 of line theNum of btn "PopupMenu" into fld "Rfld"
> end repeat
> pass controlKeyDown
> end controlKeyDown
> You may use the lineOffset function like this:
> get lineOffset("ctrl+" & theKey,btn "popupMenu")
> if (it is 0) then
> put "Nothing" into fld "Rfld"
> put item 1 of line it of btn "PopupMenu" into fld "Rfld"
> end if
> Just a suggestion to facilitate the work of Revolution ;)
> -Zryip TheSlug- wish you the best! 8)
More information about the use-livecode