popup in selected text in unlocked field

xbury.cs at clearstream.com xbury.cs at clearstream.com
Fri May 20 03:29:11 EDT 2005


Eric,

I dont have a minimac to test this but... in the popup menu stack, you 
could 
insert a selection handler in the pre-openstack... Would that work?

cheers
Xavier


On 20.05.2005 09:19:53 use-revolution-bounces wrote:
>Hi Stephen,
>
>I have seen Xavier answer.
>Unfortunately, it does not work with Mac OS: you can't prevent text
>deselection when popping up a menu.
>But ;-)
>Only a "not really satisfying" workaround:
>
>Set the hiliteColor of your field ("#B5D5FF" for standard Mac OS for
>instance).
>Then, in the script of your field:
>
>on mouseDown pButton
>local tChunk
>-----
>if pButton = 3 then
>put the selectedChunk into tChunk
>if word 4 of tChunk > word 2 of tChunk then
>set the backcolor of the selectedChunk to the hiliteColor of me
>popup btn "MyMenu"
>end if
>end if
>end mouseDown
>--------------------------
>on selectionChanged
>set the backcolor of char 1 to -1 of me to empty
>end selectionChanged
>
>Best regards from Paris,
>
>Eric Chatonet.
>
>Le 20 mai 05 à 06:56, Stephen Barncard a écrit :
>
>> 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...?..
>
>----------------------------------------------------------------
>So Smart Software
>
>For institutions, companies and associations
>Built-to-order applications: management, multimedia, internet, etc.
>Windows, Mac OS and Linux... With the French touch
>
>Plugins, tutorials and more on our website
>----------------------------------------------------------------
>Web site        http://www.sosmartsoftware.com/
>Email        eric.chatonet at sosmartsoftware.com/
>Phone        33 (0)1 43 31 77 62
>Mobile        33 (0)6 20 74 50 86
>----------------------------------------------------------------
>
>_______________________________________________
>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