mouseLeave

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
mouseLeave
Associationsstack, card, field, button, graphic, scrollbar, player, image
Summary

Sent when the mouse pointer moves out of an object.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
on mouseLeave -- hide another object
  hide field "Comments"
end mouseLeave
RelatedMessage: mouseWithin, mouseEnter
Command: focus, hide
Function: mouseControl
Glossary: property, Browse tool, mouse pointer, message, command, control, object, loop
Description

Handle the mouseLeave message to update a control when the mouse pointer moves outside it.

The mouseLeave message is sent only when the Browse tool is being used.

If two controls overlap, a mouseLeave message is sent whenever the mouse pointer crosses outside a visible portion of a control. The control on the bottom receives a mouseLeave message only when the mouse pointer leaves part of the control that can be seen. A control that is completely hidden by another control on top of it will never receive a mouseLeave message.

If the mouse button is down when the mouse pointer leaves the control, the mouseLeave message is sent once the mouse button has been released.

If a control is hidden (by changing its visible property to false or using the hide command), and the mouse pointer is over the control when it is hidden, LiveCode sends a mouseLeave message to the control.

Note: Take care when using both mouseEnter and mouseLeave in the same control that an unintentional infinite loop may be invoked. To prevent a loop, use a condition in the mouseLeave message handler to ensure the mouse pointer is still outside of the control or in the mouseEnter message to check the mouse pointer is still inside the control.

Tagsui