forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrab.lcdoc
More file actions
54 lines (38 loc) · 1.43 KB
/
grab.lcdoc
File metadata and controls
54 lines (38 loc) · 1.43 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
Name: grab
Type: command
Syntax: grab <object>
Summary:
Causes an <object(glossary)> to follow the movements of the mouse.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
grab graphic 1
Example:
grab the mouseControl
Example:
grab me
Parameters:
object:
Any control on the current card.
Description:
Use the <grab> <command> within a <mouseDown> <handler> to drag an
<object(glossary)> around the <stack window> without <select|selecting>
it.
You can only grab a control when the mouse pointer is within the
control's rectangle at the time the mouse is clicked. If the
<mouse pointer> is outside the <control> when the <grab> <command>
is <execute|executed>, nothing happens.
Although the <grab> <command> returns to the calling handler
immediately, the target control will remain grabbed until the user
releases the mouse button, at which point the control will receive a
mouseUp message.
If a subsequent script action deletes the control, or if the control
becomes invisible, the grab will be automatically cancelled and in this
case no message will be sent to the control.
References: click (command), drag (command), move (command),
mouseLoc (function), object (glossary), handler (glossary),
select (glossary), mouse pointer (glossary), command (glossary),
stack window (glossary), execute (glossary), control (keyword),
mouseDown (message), moveStack (message), mouseMove (message)
Tags: ui