forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclickLine.xml
More file actions
46 lines (46 loc) · 3.51 KB
/
Copy pathclickLine.xml
File metadata and controls
46 lines (46 loc) · 3.51 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
<doc>
<legacy_id>1770</legacy_id>
<name>clickLine</name>
<type>function</type>
<syntax>
<example>the clickLine</example>
<example>clickLine()</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>User Interaction</category>
</classification>
<references>
<function tag="clickStack">clickStack Function</function>
<function tag="mouseLine">mouseLine Function</function>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary><glossary tag="return">Returns</glossary> the number of the <keyword tag="line">line</keyword> that the user last clicked in a <keyword tag="field">field</keyword>.</summary>
<examples>
<example>select the clickLine</example>
<example>put the value of the clickLine into textOfClickedLine</example>
</examples>
<description>
<p>Use the <b>clickLine</b> <control_st tag="function">function</control_st> within a <message tag="mouseDown">mouseDown</message>, <message tag="mouseUp">mouseUp</message>, or <message tag="selectionChanged">selectionChanged</message> <glossary tag="handler">handler</glossary> to determine which <keyword tag="line">line</keyword> the user clicked, in order to provide <glossary tag="hypertext">hypertext</glossary> (clickable text) or take some action based on the click.</p><p/><p><b>Value:</b></p><p>The <b>clickLine</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a <glossary tag="chunk expression">chunk expression</glossary> of the form line <i>lineNumber</i> of field <i>fieldNumber</i>.</p><p/><p><b>Comments:</b></p><p>The <b>clickLine</b> <control_st tag="function">function</control_st> 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 <keyword tag="field">field</keyword>, the <b>clickLine</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> empty.</p><p/><p>The returned value indicates the line 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 <b>clickLine</b>.</p><p/><p>If the field is locked, the <b>clickLine</b> function is most useful within a <glossary tag="handler">handler</glossary> (such as <message tag="mouseDown">mouseDown</message> or <message tag="mouseUp">mouseUp</message>) that is <glossary tag="trigger">triggered</glossary> by the mouse click.</p><p/><p>If the field is unlocked, <b>mouseDown</b> and <message tag="mouseUp">mouseUp</message> <glossary tag="message">messages</glossary> are not sent when the user clicks in the <keyword tag="field">field</keyword> (unless the user right-clicks or holds down the Control key while clicking). Use the <b>clickLine</b> <control_st tag="function">function</control_st> within a <message tag="selectionChanged">selectionChanged</message> <glossary tag="handler">handler</glossary> to determine what <keyword tag="line">line</keyword> the user is editing in an <glossary tag="unlock">unlocked</glossary> <keyword tag="field">field</keyword>.</p><p/><p>To get a chunk expression describing the word or text group that was clicked, use the <b>clickChunk</b> <control_st tag="function">function</control_st>.</p>
</description>
</doc>