Restricting graphics to a field?

Wouter wouter.abraham at pi.be
Thu Jan 15 18:55:44 EST 2004


On 15 Jan 2004, at 20:09, use-revolution-request at lists.runrev.com wrote:

> Message: 4
> Date: Thu, 15 Jan 2004 11:06:59 -0700
> From: Dar Scott <dsc at swcp.com>
> Subject: Re: Restricting graphics to a field?
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <9CC79790-4785-11D8-999A-000A9567A3E6 at swcp.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>
> On Thursday, January 15, 2004, at 10:52 AM, Jan Schenkel wrote:
>
>> For some bizarre reason I was getting a huge strain of
>> mouseLeave/mouseEnter pairs whenever I moved the mouse
>> or tried to click.
>
> Rats!  And it sounded like a good idea.
>
> This might take lock messages in key places.  Or fasting.
>
> Dar Scott
>

Is this kind of doing what you are looking for?
Group some radiobuttons with tool names
!!! be careful the tool names are case sensitive
Set the script of a field under image "xxx" to this:

on mousemove
   if the mouseloc is within the rect of img "xxx"  then
     if the mouse is not down then
       put the hilitedbuttonname of group "tools" into a
       choose a tool
       checkformousewithin
     end if
   end if
end mousemove

on checkformousewithin
   if  the mouseloc is within the rect of img "xxx" or the mouse is down 
then
     send "checkformousewithin" to me in 100 millisecs
   else
     choose browse tool
     set the checking of me to false
   end if
end checkformousewithin

mouseEnter and mouseLeave messages are not always trustworthy with
superposed controls and can screw up a handler depending on it.

Greetings,
WA



More information about the use-livecode mailing list