set_selection


Description:

public abstract bool set_selection (int selection_num, int start_offset, int end_offset)

Changes the start and end offset of the specified selection.

Parameters:

this

an Text

selection_num

The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.

start_offset

the new starting character offset of the selection

end_offset

the new end position of (e.g. offset immediately past) the selection

Returns:

true if successful, false otherwise




2022 vala-language.org