Select Static Text Element from Combo Box

Class library usage, coding and language questions.
mvn
Posts: 9
Joined: Wed Feb 13, 2008 11:17 am

Select Static Text Element from Combo Box

Post by mvn » Mon Sep 15, 2008 2:22 pm

Hi,
How can I select a static text element from a combo box that contains a
long list of static text elements. I can select those that are shown when the combo box drop down list is displayed but not those that are hidden?
I want to avoid multiple clicks on the combo box push button as the list can change, would prefer if there was some logical method to select the actual text. Class name is WindowsForms10.COMBOBOX.app

Thanks,

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Sep 15, 2008 4:09 pm

Setting the "SelectedText" or "SelectedIndex" properties on the Ranorex ComboBox object should work, e.g.

ComboBox myCombo = <.. find by class name or control name ..>

myCombo.SelectedIndex = 0;
or
myCombo.SelectedText = "ListEntry42";


Michael
Ranorex Team