Contextual menu trouble
William de Smet
williamdesmet at gmail.com
Tue Jan 18 11:34:03 EST 2011
Hi there,
@John: with the Locktext set to true?
This way I cannot paste into the field.
I feel real stupid because it doesn't work.
Anyone?
In a field:
on mouseDown theMouseButton
if theMouseButton is 3 then
popup button "popup"
else
pass mouseDown
end if
end mouseDown
on mouseUp theMouseButton
if theMouseButton is 3 then
popup button "popup"
else
pass mouseUp
end if
end mouseUp
Button "popup":
on menuPick pItemName
switch pItemName
case "Cut"
cut
break
case "Copy"
copy
break
case "Paste"
paste
break
end switch
end menuPick
greetings,
William
2011/1/18 John Dixon <dixonja at hotmail.co.uk>:
>
>
> You might try.... in the script of a field, with the 'lockText' set to true
>
> on mouseDown
> if the menuMouseButton of button 1 = 1 then
> popUp button 1
> end if
> end mouseDown
>
> be well
>
>> > I am working on a contextual menu in a textfield.
>> > I searched this list, the forum on Runrev and used the Dictionary.
>> > Everything works: I get a right click in a field but nothing happens
>> > after I choose the contextual menu.
>> > Am I missing something?
>> >
>> >
>> > In a field:
>> > on mouseDown theMouseButton
>> > if theMouseButton is 3 then
>> > popup button "popup"
>> > else
>> > pass mouseDown
>> > end if
>> > end mouseDown
>> >
>> > on mouseUp theMouseButton
>> > if theMouseButton is 3 then
>> > popup button "popup"
>> > else
>> > pass mouseUp
>> > end if
>> > end mouseUp
>> >
>> > Button "popup":
>> > on menuPick pItemName
>> > switch pItemName
>> > case "Cut"
>> > cut
>> > break
>> > case "Copy"
>> > copy
>> > break
>> > case "Paste"
>> > paste
>> > break
>> > end switch
>> > end menuPick
>> >
>> > Greetings,
>> >
>> > William
>> _______________________________________________
>> 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