SelectAll function missing from ComboBox

A combobox is suppose to be a combination of a TextField and combobox. Many useful functions from the TextField class seem to be missing from the combobox. I did not expect this to work but I have even attempted casting a combobox as a TextField. Any way around this problem?

Thanks

Set the selStart to 0 and selLength to the length of text in the combobox should do what you want.

Wrong! At least in Windows Xojo 2014r3.2 combobox selStart and selLength both are useles as they not work. :frowning:

Select all in the ComboBox works fine here (Xojo 2013 R3.3 on MacOS X 10.6.8)

You should use the latest version. It works perfectly in 2015R1. For instance. Windows 10 Tech Preview.

Sub Action() ComboBox1.SelStart = 1 ComboBox1.SelLength = len(ComboBox1.text) End Sub

Update : I just tried the same test program in 2014R3.2 with exactly the same result. It is not nice to spread false information :confused:

Oliver : To select all, just do what I posted.

You might not need to do that. The system shortcut works just fine for me (but then I’m on a Mac).

Michel, have you tried the system shortcut for SelectAll on Windows?

[quote=179466:@Markus Winter]You might not need to do that. The system shortcut works just fine for me (but then I’m on a Mac).

Michel, have you tried the system shortcut for SelectAll on Windows?[/quote]

Ctrl-A works perfectly as well. But I thought what Oliver wanted was to do that in code. But now I notice this 2013 thread was hijacked, and Oliver must have moved on a long time ago. At any rate, proof is in the pudding and the ComboBox selstart and sellenght work perfectly.

[quote=179463:@Michel Bujardet]You should use the latest version. It works perfectly in 2015R1. For instance. Windows 10 Tech Preview.

Sub Action() ComboBox1.SelStart = 1 ComboBox1.SelLength = len(ComboBox1.text) End Sub

Update : I just tried the same test program in 2014R3.2 with exactly the same result. It is not nice to spread false information :confused:

Oliver : To select all, just do what I posted.[/quote]
Setting SelStart to 1 will start the selection with the second character. You need to set it to 0 to select the entire contents.

Right. I typed too fast. Thanks.