Contextual Menus

Eric Chatonet eric.chatonet at sosmartsoftware.com
Mon Jul 21 05:37:41 EDT 2008


Bonjour Bill,

To not loose the focus in the field, just set the traversalOn of the  
button to false :-)

Le 21 juil. 08 à 03:06, Bill Vlahos a écrit :

> Thanks Eric.
>
> I've added the following script to a field:
> on mouseDown pButton
>   if pButton = 3 then
>     put "Cut" & return & "Copy" & return & "Paste" into tMenu
>     put tMenu into button "b1"
>     popup btn "b1"
>   end if
> end mouseDown
>
> This didn't do anything until I also added a button (which can be  
> hidden) called "b1". The button has a menuPick handler which  
> correctly responds to the menu item selected.
>
> However the text that had been selected in the field is deselected  
> when the popup menu pops up so the menuPick item doesn't have  
> anything to work with. An example would be to copy the text so I  
> need the originally selected text to work with.
>
> What am I missing?
>
> Bill Vlahos

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list