Creating Context Menus For Selected Text in a Field |
|
traversalOn of the popup menu button to false, and the
selectedChunk will remain the same -- I used this sort
of construct in one project:
## field script
on mouseDown pButton
if pButton = 3 then popup button "FieldMenu"
end mouseDown
## popup button script
on menuPick pItem
switch pItem
case "cut"
cut
break
case "copy"
copy
break
case "paste"
if the clipboard is "text" then paste else beep
break
case "clear"
delete
break
end switch
end menuPick
## And this works remarkably well...
Posted on 2/21/05 by Jan Schenkel the Use Revolution list