sapgui_text_edit_set_selection_indexes

Example: sapgui_text_edit_set_selection_indexesText Edit Control Functions

Sets the visually selected text range.

int sapgui_text_edit_set_selection_indexes( const char *description, const char *textEditID, const char *startNumber, const char *endNumber, [args,]  LAST );
description User entered text to aid in understanding script
textEditIDObject ID Strings
startNumber The zero-based position of the first character in the selection
endNumber The zero-based position of the first character after the end of the selection
argsOptional Arguments
LAST A marker indicating the end of the argument list. Not required if Optional Arguments are used.

sapgui_text_edit_set_selection_indexes sets the visually selected text range. Arguments startNumber and endNumber are zero based character indexes. startNumber corresponds to the position where the selection begins and endNumber is the position of the first character following the selection.

Setting startNumber equal to endNumber results in setting the cursor at this position.

If startNumber is past the end of the text, it is set to the last position in the text. If endNumber is past the end of the text, it is set to one character past the end of the text. If both startNumber and endNumber are past the end of the text, they are set to the last position in the text.

In all cases of arguments past the end of the text, the log for this function reports the values of the arguments as passed to the function. However, sapgui_text_edit_get_selection_index_start and sapgui_text_edit_get_selection_index_end report the actual selected positions.

Return Values

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure.

Parameterization

You can parameterize all string (char type) arguments.