forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdragLeave.lcdoc
More file actions
58 lines (40 loc) · 1.65 KB
/
dragLeave.lcdoc
File metadata and controls
58 lines (40 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Name: dragLeave
Type: message
Syntax: dragLeave
Summary:
Sent when the <mouse pointer> moves out of an <object(glossary)> during
a <drag and drop>.
Introduced: 2.0
Associations: card, field, button, graphic, scrollbar, player, image
OS: mac, windows, linux
Platforms: desktop, server
Example:
on dragLeave -- remove any outline around the drop no-longer-target
set the borderColor of the target to empty
end dragLeave
Description:
Handle the <dragLeave> <message> to update a <control> when the
<mouse pointer> moves outside it during drag and drop.
The <dragLeave> <message> is sent only when a <drag and drop> operation
is in progress.
If two controls overlap, a <dragLeave> <message> is sent whenever the
<mouse pointer> crosses outside a visible portion of a <control>. The
<control> on the bottom receives a <dragLeave> <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 <dragLeave> <message>.
You can use the <dragEnter> and <dragLeave> <message|messages> to
display a visual cue that shows which <control> will receive the drop if
the user releases the mouse button. For example, the following
<handler|handlers> turn the border of a "droppable" object green while
the mouse is over it:
on dragEnter
set the borderColor of the target to "green"
end dragEnter
on dragLeave
set the borderColor of the target to empty
end dragLeave
References: object (glossary), handler (glossary), control (glossary),
mouse pointer (glossary), message (glossary), drag and drop (glossary),
dragEnter (message)
Tags: ui