Contextual Menus

Terry Judd tsj at unimelb.edu.au
Thu Jul 24 01:49:17 EDT 2008


On 24/7/08 3:40 PM, "Bill Vlahos" <bvlahos at mac.com> wrote:

> OK. So with the help of a few great people on this list I now can do
> popup contextual menus for fields. Thank you.
> 
> A user suggested that pretty much every field (regular text field)
> should be able to have a contextual menu for Cut, Copy, and Paste at a
> minimum.
> 
> How would I add this feature to all my editable fields? I can do them
> one at a time but that would be pretty tedious. There must be a more
> global way to do it.

In your card or stack script

ON mouseDown pMouseBtnNum
    IF pMouseBtnNum = 3 THEN
        IF word 1 of the target = "field" THEN
            IF not(the locktext of the target) THEN
                popup btn "contextualMenu"
            END IF
        END IF
    END IF
    pass mouseDown
END mouseDown

Terry...

> 
> Bill
> 
> On Jul 21, 2008, at 6:45 PM, J. Landman Gay wrote:
> 
>> J. Landman Gay wrote:
>> 
>>> If you just want to operate on the text, you can do things like
>>> "copy the selection".
>> 
>> Actually (she said, replying to herself) it's even easier than that.
>> Rev already knows what's selected, so if you are just using the
>> basic editing commands, all you need in a menupick is this:
>> 
>> on menupick pwhich
>>  switch pwhich
>>  case "copy"
>>    copy
>>    break
>>  case "paste"
>>    paste
>>    break
>>  case "delete"
>>    delete
>>   break
>>  default
>>  end switch
>> end menupick
>> 
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

-- 
Dr Terry Judd
Lecturer in Educational Technology (Design)
Biomedical Multimedia Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne
Parkville VIC 3052
AUSTRALIA

61-3 8344 0187




More information about the use-livecode mailing list