forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexitField.lcdoc
More file actions
55 lines (38 loc) · 1.78 KB
/
exitField.lcdoc
File metadata and controls
55 lines (38 loc) · 1.78 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: exitField
Type: message
Syntax: exitField
Summary:
Sent to the field with the selection when the selection is being removed
from the field, and its contents have not changed.
Associations: field
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
on exitField -- remove visual signs that the field is being edited
set the showBorder of the target to false
end exitField
Description:
Handle the <exitField> message if you want to do something when the user
leaves a field that hasn't been changed.
The selection is removed from a field (and the field loses focus) when
another window is brought to the front, when the user clicks in another
field, or when the user tabs out of the field. The field also loses
focus when the <select> <command> is used to select text in another field.
However, the <exitField> message is not sent when the user clicks
another point in the same field.
The <exitField> message is sent to buttons whose <menuMode> is
"comboBox", since the type-in box in a combo box behaves like a field.
The <exitField> message is sent only if the field's contents have not
changed since the last time it received the <openField>. If a
field is closing and its contents have changed, the <closeField>
is sent instead of <exitField>. This means that if you want to take an
action when the selection is removed from a field--whether the field has
changed or not--you must handle both <closeField> and <exitField>.
>*Note:* If the field's contents were changed by script using the <put>
> command, then exitField will still be sent. <closeField> is only sent
> when the contents are changed by the user.
References: put (command), select (command),
openField (message), closeField (message), focusOut (message),
menuMode (property)
Tags: ui