double mouseDown
Colin Holgate
coiin at rcn.com
Sat Sep 6 16:05:21 EDT 2008
Ok, I've worked out your script, and the problem is that the hot spot
is only one pixel wide, and it's the pixel that is four pixels to the
left of where the line is located. Once you click and hold there the
hand cursor does appear, but dragging doesn't show a live update.
The reason the column collapses is because your value tabWidth is zero
when you do the line after the repeat while the mouse is down loop (if
the user is double clicking at the time, because the repeat loop
doesn't see the mouse as being down). Adding this line before the
repeat would solve the double click issue:
put item 1 of the mouseloc + hscroll of target into tabWidth
repeat while the mouse is down
set the cursor to hand
put item 1 of the mouseloc + hscroll of target into tabWidth
end repeat
But you would still get another strangeness, because of the four pixel
offset. The column divider would jump those four pixels to the left if
you did double click.
Ideally, you should have the hot spot be exactly on target, and it
would be nice if it was possible to set the cursor to hand on
mousewithin as well, but that seems not to work.
More information about the use-livecode
mailing list