clickLine

returns the number of the line that the user last clicked in a field.

# Metadata

Platforms: desktop, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

the clickLine

# Examples

select the clickLine

put the value of the clickLine into textOfClickedLine

# Description

Use the clickLine function within a mouseDown, mouseUp, or selectionChanged handler to determine which line the user clicked, in order to provide hypertext (clickable text) or take some action based on the click.

The clickLine 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 clickLine function returns empty.

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 clickLine.

If the field is locked, the clickLine function is most useful within a handler (such as mouseDown or mouseUp) that is trigger by the mouse click.

If the field is unlocked, mouseDown and mouseUp 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 clickLine function within a selectionChanged handler to determine what line the user is editing in an unlock field.

To get a chunk expression describing the word or text group that was clicked, use the clickChunk function.

# Tags

ui,

# See

- **keyword:** field, line - **message:** mouseDown, mouseUp, selectionChanged - **function:** clickStack, mouseLine - **glossary:** return, chunk expression, handler, trigger, message, unlock, hypertext - **control structure:** function