Control or right click to show popup menu

Peter Bogdanoff bogdanoff at me.com
Mon Oct 3 14:37:42 EDT 2022


Thanks, Craig. That is exactly the solution if figured out over the weekend, use the click command to click at the mouseLoc.

Peter

> On Oct 3, 2022, at 6:47 AM, Craig Newman via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi.
> 
> On a new card make a field and a pulldown menu button. Place a few lines of text in the field and lock it. In the field script:
> on mouseUp
> 
> set the loc of btn 1 to the mouseloc
> 
> click at the mouseLoc
> 
> end mouseUp
> 
> The menu opens at the line clicked on. 
> 
> This has been discussed extensively in the forums, if you want to search there. That discussion mainly dealt with loading the contents of the button with the field contents, or the selection of a particular menuItem once the menu itself was open. 
> 
> Craig
> 
>> On Oct 1, 2022, at 5:08 AM, Richmond via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> Why does this make me have a funny feeling you are still using a one-button mouse on a Macintosh?
>> 
>> Certainly, I would stick with
>> 
>> on mouseDown  MN
>>  if MN is 3 then . . .
>> 
>> Best, Richmond.
>> 
>> On 1.10.22 11:17, Peter Bogdanoff via use-livecode wrote:
>>> Hi,
>>> 
>>> I want to control or right click on a line of text in a field to show a popup menu. So I’ve set the popup menu button to the loc of the mouse and it’s showing in place when the  controlKey is down.
>>> 
>>> However, the menu items won’t show  while the control key is also down.
>>> 
>>> Maybe I’m doing this wrong. In my application, how do make this work:  the user holds down the control key or right click  to do editing via choices provided by some kind of popup menu? Both Mac and Windows.
>>> 
>>> Thanks,
>>> _______________________________________________
>>> 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
>> 
>> 
>> _______________________________________________
>> 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
> 
> _______________________________________________
> 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