WebCombobox: how to select all, part or none of the text?

well everything is in the title.
there is a selectionChanged event, but nothing to select the text ?
I assume you can do it using executejavascript, but how ?


execute this javascript on the webcombobox,

replace [1] with the controlID
[2] with the index of the start of the text
[3] with the index of the end of the text

var node = document.getElementById("[1]").firstChild;
var range = document.createRange();
range.setStart(node, [2]);
range.setEnd(node, [3]);
var selection = window.getSelection();
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.