Simulate a popup menu button

dunbarx at aol.com dunbarx at aol.com
Tue Jul 17 08:44:05 EDT 2012


Hi.


Are you using an actual pop-up style button, like a PullDown or cascade?


Or are you rolling your own, as it seems, when you said 'simulate'?


If you are making your own, what is the reason to do that?


If you are using one of the standard button styles, the usual method is something like:



on menuPick pItemName
   switch pItemName
      case "choice 1"
         answer the menuHistory of me
   break
case "choice 2"
  beep 3
  break
   end switch
end menuPick


Anyway, read the dictionary about the "menuHistory". It is likely what you are missing.


Craig Newman







-----Original Message-----
From: Lars Brehmer <larsbrehmer at mac.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Tue, Jul 17, 2012 4:57 am
Subject: Simulate a popup menu button


I am trying to simulate the action of using a popup menubutton, but I can't 
figure out how to do the middle step (if that is even possible)

     click at the buttonLoc 

reveals the menu choices and

     send "menuPick" && "the menu choice" 

executes the menuPick. 

But I can't figure out to hilite the menu choice line while the menu is visible. 


     select menuItem 2 

doesn't actually hilite the menu line. What am I missing here?

Cheers,

Lars

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list