Add set-selection-offsets function to TextInput, TextEdit, and LineEdit (#4197)

The function accepts two arguments that specify the start and the end of the text to select.

Fixes #4164
This commit is contained in:
Brandon Fowler 2024-01-06 05:12:53 -05:00 committed by GitHub
parent ed54581aa1
commit 3e8940660b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 233 additions and 1 deletions

View file

@ -19,6 +19,7 @@ shortcut will be implemented in a future version: <https://github.com/slint-ui/s
### Functions
- **`focus()`** Call this function to focus the TextEdit and make it receive future keyboard events.
- **`set-selection-offsets(int, int)`** Selects the text between two UTF-8 offsets.
- **`select-all()`** Selects all text.
- **`clear-selection()`** Clears the selection.
- **`copy()`** Copies the selected text to the clipboard.