Restricting graphics to a field?

Doug Lerner doug at webcrossing.com
Sat Jan 17 00:05:06 EST 2004


I was thinking this could maybe be accomplished with something as simple as

on mouseDown
    if the target <> "field canvas" then
        choose browse tool
    end if
end mouseDown

but that does work for various reasons.

I don't know why though. The docs say:

-----

The mouseDown message is sent to the control that was clicked, or to the
card if no control was under the mouse pointer.

If the Browse tool is being used, and you click an unlocked field with mouse
button 1 or 2, no mouseDown message is sent. If you click with button 3, the
mouseDown message is sent even though the field is not locked.

-----

If the browse tool was being used anyway, it doesn't matter if the mouseDown
message is not sent. But it seems to be not sent when the graphic tool is
being used also, regardless of whether the field is locked or not.

Does anybody know why?

I think this would be perfect if it worked! :-)

doug



More information about the use-livecode mailing list