I am trying to come up with some code that will work to select a specified value from a drop-down list. This is a home-grown control (called TTPDualLookup) that was based on a DevExpress ComboBox control. I'm using VBScript.
The "DualLookup" seems to mean that the values in the drop down are concatenated from two sources (Vendor Code and Vendor Name, in this example). There are multiple objects for each combobox. The first is the one that contains the selection and also clicks to open the second object, which is the list that contains the concatenated objects.
I've attached a txt copy of a short script that selects a value based on screen position, but that's not going to work for us. Also a screen shot of the field.
Can anyone please help me get started on this? point me in the right direction? Explain why the vista.TcxPopupEditPopupWindow.TcxGrid object is at a higher level than the drop-down? and why it says it's a grid object when it really isn't? and how to look at the properties, methods, etc, of this object when they only display when the drop-down is activated (and it can not be activated when I leave the screen itself to look at the object browser).
Or -- even better - tell me how to actually DO this? (please?)
See the attachments and let me know if I need to go elsewhere with this?
Explain why the vista.TcxPopupEditPopupWindow.TcxGrid object is at a higher level than the drop-down?
This behavior is programmed by the tested application developers.
and why it says it's a grid object when it really isn't?
Developers gave the TcxGrid class name to the control. It is equal to QuantumGrid's class name, and TC recognizes it as a grid.
and how to look at the properties, methods, etc, of this object when they only display when the drop-down is activated
Open the Object Properties window (see the "Object Properties Window" help topic), select "Select Object with Cursor", move your mouse over your control and once it is obtained by TC, press the shortcut (Tools | Options | Global | Global Shortcuts | Fix information) to fix the information.
how to actually DO this?
First of all, make sure your application is compilled with debug info (see the "Debug Info Agent" help topic).
Here is a sample script:
Dim wCombo, rowId, strCol
Set wCombo = <Path_To_Your_Combo_Box(FullName property value)>
rowId = <Row_Number>
strCol = "<Column>"
If clickItem(wCombo, rowId, strCol) Then
Log.Message "The [" & rowId & ", '" & strCol & "'] cell was successfully clicked."
Function clickItem(wCombo, rowId, strCol)
Dim p, wDropDown, rowCount, colCount, colId, bounds