Right click in field for menu

Peter Bogdanoff bogdanoff at me.com
Wed Jun 1 16:53:20 EDT 2022


Hi, I finding that after right-clicking in the field and then showing the button popup menu, the focus is shifted to the menu. That’s good. However, if there was text selected in the field that I want to copy or clear, the selection is now lost since the focus was shifted.

I can grab the selected characters before invoking the popup menu and then reselect the original characters in the field to do the edit action. But that seems to be kludge.

Is there a better way to edit a selection in a field using a menu popup?

Peter

> On Jun 1, 2022, at 11:40 AM, Klaus major-k via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>> wrote:
> 
> Hi Peter,
> 
>> Am 01.06.2022 um 20:34 schrieb Peter Bogdanoff via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
>> 
>> Hi,
>> 
>> I’m wanting to implement a right click (button 3) in an unlocked desktop field to show a pop up menu.
>> How would I do this?
> 
> on mousedown tNumber
>  ## mousebutton 3 = right-click
>  if tNumber = 3 then
>    popup btn "your popup here..." at the mouseloc
> end if
> end mousedown
> 
>> Is the menu that would show Livecode, or from the OS?
> 
> That will popup a LC popup menu button.
> 
>> Thanks,
>> 
>> Peter Bogdanoff
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de <https://www.major-k.de/>
> https://www.major-k.de/bass
> klaus at major-k.de
> 
> 
> _______________________________________________
> 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