From Xojo Documentation

You are currently browsing the old Xojo documentation site. It will go offline as of October 2, 2023. Please visit the new Xojo documentation site! - you will be redirected shortly...

Property (As Integer )
aDesktopComboBox.SelectionStart = newIntegerValue
IntegerValue = aDesktopComboBox.SelectionStart

New in 2021r3

Supported for all project types and targets.

The position of the insertion point. A value of zero means that the insertion point is before the first character.


Use SelectionStart to set the position of the insertion point in the text. Use SelectionStart in conjunction with SelectionLength to select a portion of the text in the ComboBox, beginning with SelectionStart and extending for SelectionLength characters.

Sample Code

This code selects the second through the fourth characters. After the code is executed, those characters are highlighted in the ComboBox.

ComboBox1.SelectionStart = 1
ComboBox1.SelectionLength = 3