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

@ -20,6 +20,10 @@ export component LineEditBase inherits Rectangle {
callback accepted( /* text */ string);
callback edited(/* text */ string);
public function set-selection-offsets(start: int, end: int) {
i-text-input.set-selection-offsets(start, end);
}
public function select-all() {
i-text-input.select-all();
}