Color Madness

dunbarx at aol.com dunbarx at aol.com
Fri Nov 22 18:25:41 EST 2013


Mike.


Turning the autoHilite off certainly gets rid of the oddity, and there must be a clue there, so thanks.


But, still, why does this happen only in a downward drag, not upward?


If I do this:



on mouseMove
   put the rect of btn 1 into temp
   put the mouseV  + 5 into item 2 of temp
   if the mouse is down then set the rect of btn 2 to temp
end mouseMove


The effect does not show up. The moving cursor does not "touch" the changing button (may relate to the autoHilite?)  If I leave out that offset, or put a negative one in, it does show up.



Craig


-----Original Message-----
From: Michael Gruenthal <mgruenthal at mac.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Fri, Nov 22, 2013 3:56 pm
Subject: Re: Color Madness


Sounds like you may have autoHilite enabled for btn 2?

On 11/20/13, 12:58 PM, "dunbarx at aol.com" <dunbarx at aol.com> wrote:

>
>Tried this on the forum. Only Simon loves me.
>
>
>Experimenting with a simple gadget to help a new user, I made two largish
>square buttons, and set the backColor of btn 2 to any old color. I put
>this into the card script:
>
>
>on mouseMove
>   get the rect of btn 1
>   put the mouseV into item 2 of it
>   if the mouseloc is within the rect of btn 1 and the mouse is down then
>set the rect of btn 2 to it
>end mouseMove
>
>
>Not rocket science, button 2 "fills" or "empties" btn 1 when you click
>and drag inside btn1. But the when I move the cursor in a downward
>direction, the backcolor of btn 2 changes to dark purple. It displays the
>prescribed color just fine on the way up. If I clear the color of btn 2,
>same thing, basically, clear going up, purple going down.. If I start
>with two brand new rectangular buttons, not setting any color, there is
>no such effect. As soon as I set any backColor in btn 2, though, this odd
>effect appears.
>
>
>I tried:
>
>
>on mouseEnter
>set the backColor of btn 2 to "113,115,23" --arbitrary RGB
>end mouseEnter
>
>
>on mouseMove
>   get the rect of btn 1
>   put the mouseV into item 2 of it
>   if the mouseloc is within the rect of btn 1 and the mouse is down then
>      put the backColor of btn 2 -- to monitor while moving
>      set the rect of btn 2 to it
>   end if
>end mouseMove
>
>
>The initital setting ("113,115,23") is shown in msg going both up and
>down, so LC seems not to know about the change. The purple "down" color
>seems to be overlaid on, not substituted for, the initial color. This can
>be seen if you try different starting colors. The purple "down" overlay
>mixes differently with any initial color choice.
>---------
>
>AHA. Found out that if the cursor touches btn 2, the purple thing
>appears. if it does not, normal colors. In my test, the mouseV and the
>top of btn 2 are coincident. If I have the cursor ride just above the top
>of btn 2, back to normal colors in both directions.
>
>
>
>Seems like a bug to me, and an odd one at that. LC 6.1.3, Mac OS 10.6.
>
>
>Craig Newman
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the Use-livecode mailing list