Page 1 of 1

Make ComboBox DropDown visible in code

Posted: Fri Oct 16, 2015 2:54 pm
by stapes
How do I make the DropDown part of a ranorex.ComboBox visible.

Code: Select all

Ranorex .ComboBox  comboBox=repo.Form365AgilePortal.FormsContainer.FieldPropertiesForm.AnswerTypeComboBox;
if(!comboBox .DropDownVisible )
        	{
        		// .. to go here ...
        	}
This is very frustrating.

I can open the combo box on screen by clicking the down arrow, but it closes as soon as I touch anything else.
I tried clicking the arrow in code, but all that happens is the control changes color:

Code: Select all

repo.Form365AgilePortal.FormsContainer.FieldPropertiesForm.BtnArrowBackground1.Click ();
I want to be able to search the contents of the combo box, at the moment it can't see them.

Re: Make ComboBox DropDown visible in code

Posted: Mon Oct 19, 2015 4:27 pm
by Support Team
Hello stapes,

Usually, you can set the attribute value "DropDownVisible" to "true" in order to expand the items in a combobox.
repo.Preferences.MyComboBox.Element.SetAttributeValue("DropDownVisible", "true");
I hope that helps.

Regards,
Bernhard

Re: Make ComboBox DropDown visible in code

Posted: Wed Oct 21, 2015 3:35 pm
by stapes
That does the trick, thank you.