SET_SELECTION_POS
Use this method to set a selection for a text area. The position is automatically placed within the visible section of the control.
Windows |
HTML |
Java |
ü |
X |
ü |
call method textedit->set_selection_pos
exporting
from_line = from_line
from_pos = from_pos
to_line = to_line
to_pos = to_pos
exceptions
error_cntl_call_method = 1.
Parameter |
Description |
from_line |
Line number at which the selection should begin |
from_pos |
Position within the line at which the selection should begin |
to_line |
Line number at which the selection should end |
to_pos |
Position within the line at which the selection should end |

If the “from” and “to” line and position numbers are the same, no text is selected, but the cursor is placed at the corresponding position.
You can make the selection invisible to the user as follows:
...
1. Get the current cursor position
2. Switch off the redraw function by calling the method AUTO_REDRAW and setting the ENABLE_REDRAW parameter to false.
3. Set the required selection. Other actions may follow at this point.
4. If required, set the old position.
5. Reenable the automatic redraw by calling the method AUTO_REDRAW and setting the ENABLE_REDRAW parameter to true.
