Page 1 of 1

suggestion for controls that open

Posted: Tue Dec 04, 2007 5:38 pm
by jasong
Please provide an 'open' method for controls like combo boxes and dates that can expand or open up. Consequently, it would also be good to provide a 'close' method as well.

Posted: Tue Dec 04, 2007 6:26 pm
by Support Team
There are such methods for combo box controls (ComboBoxShowDropDown and ComboBoxHideDropDown).

With "dates" I assume you mean the DateTimePicker control, right?

Alex
Ranorex Support Team

Posted: Wed Dec 05, 2007 5:16 pm
by jasong
yes, with dates it would be the DateTimePicker control I was referring to.

One thing though, I tried the ComboBoxShowDropDown and ComboBoxHideDropDown methods but it did not actually affect the opening or closing of the list for the combobox.

I notice the requirement for certain styles (CBS_DROPDOWN and CBS_DROPDOWNLIST) which I am unsure how to determine if this combobox has.

RanoresSpyPro says 'Extended properties not supported' for that control. Then again I am finding it claims the properties are not supported for even windows explorer controls.

Posted: Thu Dec 06, 2007 11:49 am
by Support Team
I just checked with the DateTimePicker class. I'm sorry, but this control does not support access to the drop-down button (neither by use of accessibility, nor by .NET methods), so there is very little chance that automating the showing/hiding of the calender can be done other than by clicking the drop-down.
The only other way I found is sending an F4 keystroke to show the calendar and an ESCAPE keystroke to hide it, respectively.

I also checked the functionality of the ComboBoxShowDropDown and ComboBoxHideDropDown methods with standard Windows (e.g. the checkbox in the "Date and Time Properties" dialog) as well as .NET controls. If you're still experiencing problems, don't hesitate to send as a sample application containing the combobox you got problems with.

The 'Extended properties' shown by the RanorexSpyPro are only available for .NET 2.0 controls. We'll add some info to the RanorexSpyPro pointing that out for the next version.

Regards,
Alex
Ranorex Support Team