popup in selected text in unlocked field

xbury.cs at clearstream.com xbury.cs at clearstream.com
Fri May 20 03:07:59 EDT 2005


Hi Stephen,

here's what you need:
[script]
local mylastselection

on mousedown x
  put the selectedchunk of me into mylastselection
  if mylastselection is not empty then select mylastselection
  if x is 3 then
  lock messages
  popup "EditMenu" at the mouseloc
  end if
  -- pass mousedown
end mousedown
[/script]

Works like a charm! Tested in the TAOO documentation stack
with a custom stack-menu named EditMenu. Just add the script above to the
field "content" script

The TAOO doc stack is here:
http://www.monsieurx.com/modules.php?name=News&file=article&sid=166

cheers
Xavier
http://monsieurx.com


On 20.05.2005 06:56:11 use-revolution-bounces wrote:
>I know there's some kind of trick here to do this;
>
>
>I have an unlocked, editable field with text. I select a portion of
>the text, then option click on it for a popup that has a few options
>to select from to do something to the text, like uppercase,
>lowercase, etc.
>
>This changing works with a button and an option menu combo, but not
>in a contextual button. Any activity on the field kills the selection.
>
>Attempting this always loses the selection, then there's nothing to
>change, and all attempts to save the selection range description to a
>global still don't seem to work.
>
>I'm sure there's a dance of locking and unlocking to get this to
>work, but I haven't found it yet... any ideas...?..
>
>thanks
>
>sqb
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution


-----------------------------------------
Visit us at http://www.clearstream.com
IMPORTANT MESSAGE    Internet communications are not secure and therefore
Clearstream International does not accept legal responsibility for the
contents of this message.    The information contained in this e-mail is
confidential and may be legally privileged. It is intended solely for the
addressee. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful. Any views expressed in this e-mail are
those of the individual sender, except where the sender specifically states
them to be the views of Clearstream International or of any of its
affiliates or subsidiaries.    END OF DISCLAIMER


More information about the use-livecode mailing list