This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathclickCharChunk.lcdoc
More file actions
76 lines (56 loc) · 2.69 KB
/
clickCharChunk.lcdoc
File metadata and controls
76 lines (56 loc) · 2.69 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Name: clickCharChunk
Type: function
Syntax: the clickCharChunk
Syntax: clickCharChunk()
Summary:
<return|Returns> the position of the <character> the user last clicked
in a <field>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, mobile
Example:
the clickCharChunk
Example:
if word 2 of the clickCharChunk < 100 then put the clickChar into me
Returns:
The <clickCharChunk> <function> <return|returns> a <chunk expression> of
the form char charNumber to charNumber of field fieldNumber.
Description:
Use the <clickCharChunk> <function> within a <mouseDown>, <mouseUp>, or
<selectionChanged> <handler> to determine where in the text the user
clicked, in order to provide <hypertext> (clickable text) or take some
action based on the click.
The <clickCharChunk> <function> is cleared at the next mouse click, as
as after some editing actions such as deleting text. If the last click
was not in a <field>, the <clickCharChunk> <function> <return|returns>
empty.
The charNum is the <character> the <mouse pointer> was over when the
mouse was clicked. Moving the mouse before the <mouse button> is
released does not affect the <value> <return|returned> by the
<clickCharChunk>.
The first and second character numbers in the return value are always
identical, unless the click was on a field but there was no text under
it. In this case, the <clickCharChunk> <return|returns> a
<chunk expression> of the form char charNumber to charNumber - 1 of
field fieldNumber indicating the start of the clickLine. For example,
if the mouse is over an empty <field>, the <clickCharChunk>
<return|returns> char 1 to 0 of field fieldNumber.
If the field is locked, the <clickCharChunk> <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
<clickCharChunk> function within a <selectionChanged> <handler> to
determine what <characters> the user is editing in an <unlock|unlocked>
<field>.
To get the actual character clicked, use the <clickChar> <function>.
References: function (control structure), value (function),
mouseCharChunk (function), clickText (function), clickStack (function),
clickChar (function), return (glossary), chunk expression (glossary),
handler (glossary), mouse button (glossary), trigger (glossary),
message (glossary), unlock (glossary), hypertext (glossary),
mouse pointer (glossary), field (keyword), character (keyword),
characters (keyword), mouseDown (message), mouseUp (message),
selectionChanged (message)
Tags: ui