forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclickChar.lcdoc
More file actions
60 lines (42 loc) · 1.83 KB
/
clickChar.lcdoc
File metadata and controls
60 lines (42 loc) · 1.83 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
58
59
Name: clickChar
Type: function
Syntax: the clickChar
Syntax: clickChar()
Summary:
<return|Returns> the <character> the user last clicked in a <field>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, mobile
Example:
the clickChar
Example:
if the clickChar is not "*" then beep 2
Returns:
The <clickChar> <function> <return|returns> a <character>.
Description:
Use the <clickChar> <function> within a <mouseDown>, <mouseUp>, or
<selectionChanged> <handler> to determine which <character> the user
clicked, in order to provide <hypertext> (clickable text) or take some
action based on the clicked <character>.
The <clickChar> <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 <clickChar> <function> <return|returns> empty.
If the field is locked, the <clickChar> 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
<clickChar> <function> within a <selectionChanged> <handler> to
determine what <characters> the user is editing in an <unlock|unlocked>
<field>.
To find the position of the <clickChar>, use the <clickChunk>
<function>.
References: function (control structure), clickCharChunk (function),
mouseChar (function), charToNum (function), clickChunk (function),
clickText (function), handler (glossary), unlock (glossary),
message (glossary), trigger (glossary), return (glossary),
hypertext (glossary), field (keyword), character (keyword),
characters (keyword), mouseDown (message), mouseUp (message),
selectionChanged (message)
Tags: ui