Field_GetSelection()

Examples


The Field_GetSelection() function retrieves the text currently selected in a text field.

Syntax

Field_GetSelection(text_field, {start_position, length})

Parameters

text_field – The text field from which you are retrieving the selection.

start_position – A returned integer containing the starting position of the selection.

length – A returned integer containing the length of the selection. If no text is selected, 0 is returned.

Return value

A string containing the selected text. Up to 255 characters can be returned.

Comments

If more than 255 characters are selected, only the first 255 characters are returned. You can use the substring() function to retrieve the additional characters.


Documentation Feedback