user-movable fields

Lynch, Jonathan bnz2 at cdc.gov
Thu Apr 14 09:21:37 EDT 2005


If anyone needs it, I have scripts that go inside fields or images that
allow for the user to move them and/or resize them from any corner.

I created them before being aware of the grab command, so you might want
to modify them a bit, but both the move and resize abilities seem to
work quite well.

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Bob
Hartley
Sent: Wednesday, April 13, 2005 5:48 PM
To: How to use Revolution
Subject: Re: user-movable fields

At 05:40 06/04/2005, you wrote:

>Thank you all!
>
>I just put a demo of the user-movable fields, and an example of how it 
>might be useful, in the user spaces of revonline--  "User movable
fields", 
>under programming.
>
>This is so cool-- when I first thought of it this morning, I figured it

>would take arduous programming. Amazing.  Smart Rev--very RAD.


OK this has been done in one of my unfinished apps... see my user space 
NIJINSKY and the stack
move and resize via drag and drop.

make a text field and put this into its script
on mouseDown
     if the controlKey is down then
       grab me
       end if
end mouseDown

on mouseStillDown
   if the altKey is down then
     put the rect of me into tRect
     put the mouseH into item 3 of tRect
     put the mouseV into item 4 of tRect
     set the rect of me to tRect
   end if
end mouseStillDown


on mouseWithin
    if the optionKey is down then
      if the lockText of me is false then
        set the lockText of me to true
      end if
    else
      if the lockText of me is true then
        set the lockText of me to false
      end if
    end if
end mouseWithin

Then use control and alt to move and resize it. :-)

Neat ehhhh :-)

Cheers
Bob



>Sandy     (aka Troutfoot)
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.9.3 - Release Date: 05/04/2005


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.8 - Release Date: 13/04/2005


_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list