forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclickField.lcdoc
More file actions
38 lines (21 loc) · 1.8 KB
/
clickField.lcdoc
File metadata and controls
38 lines (21 loc) · 1.8 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
Name: clickField
Type: function
Syntax: the clickField
Syntax: clickField()
Summary: <return|Returns> the number of the last <field> the user clicked.
Introduced: 1.0
OS: mac,windows,linux,ios,android
Platforms: desktop,web,mobile
Example:
the clickField
Example:
if the clickField is field "New Items" then exit mouseUp
Returns: The <clickField> <function> <return|returns> the <number> of the clicked <field>.
Description:
Use the <clickField> <function> within a <mouseDown>, <mouseUp>, or <selectionChanged> <handler> to determine which <field> the user clicked, in order to provide <hypertext> (clickable text) or take some action based on the click.
The <clickField> <function> is cleared at the next mouse click, as well as after some editing actions such as deleting text. If the last click was not in a <field>, the <clickField> <function> <return|returns> empty.
The returned value indicates the field that the mouse pointer was over when the mouse was clicked. Moving the mouse before the mouse button is released does not affect the value returned by the <clickField>.
If the field is locked, the <clickField> function is most useful within a <handler> (such as <mouseDown> or <mouseUp>) that is <trigger|triggered> by the mouse click.
If the field is unlocked, mouseDown and <mouseUp> <message|messages> are not sent when the user clicks in the <field> (unless the user right-clicks or holds down the Control key while clicking). Use the <clickField> function within a <selectionChanged> <handler> to determine what <field> the user is editing.
References: field (keyword), mouseDown (message), mouseUp (message), selectionChanged (message), clickStack (function), number (function), handler (glossary), message (glossary), trigger (glossary), return (glossary), hypertext (glossary), function (control_st)
Tags: ui