deslecting the line tool

Ian Summerfield iansummerfield at
Sun Feb 17 09:58:01 EST 2002

On 17/2/02 2:27 pm, "Mike Brown" <mike at> scribed:

> Good Morning,
> I have a question regarding the selection and deselection of the line too.
> I have a button with this script:
> on mouseup
> set the tool to "line tool"
> end mouseup
> That sets my pointer to the line drawing tool, but I cant find a script or
> method to switch back to a pointer or browse tool.  When I placed a script
> in another button to set the pointer to the browse tool, it doesn't work.
> The line tool just draws a dot or line on top of the button.  Any
> recommendations?

Another thought,  you can't click at the location of a card button with the
paint tool selected, doing so would only draw a dot,  it's only the browse
tool that could click a button.   So if you're trying to have a script or
the use click a button to go back to the browse tool which the line tool is
selected you simply can't.   If it's script then send mouseup instead of
clicking the button. If you've fallen to an idle state letting the user do
some free form painting and want them to change the tool back by clicking a
button you could try having your browse tool button set the tool back to
browse tool by using the mousewithin,  if you save the current tool, set to
browse tool, then I think the user will be able to click the button,  if the
button isn't clicked then a mouseleave could restore the saved tool.  OR you
could just have some kind of idle handler set back to browse tool, or a
delayed send do it before giving the user control.   Does this make sense?


More information about the Use-livecode mailing list