suggestion for controls that open

Class library usage, coding and language questions.
jasong
Posts: 49
Joined: Fri Oct 26, 2007 9:38 pm
Location: Texas

suggestion for controls that open

Post by jasong » Tue Dec 04, 2007 5:38 pm

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.

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 » Tue Dec 04, 2007 6:26 pm

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

jasong
Posts: 49
Joined: Fri Oct 26, 2007 9:38 pm
Location: Texas

Post by jasong » Wed Dec 05, 2007 5:16 pm

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.

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 » Thu Dec 06, 2007 11:49 am

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