Forum Discussion

shejuti's avatar
shejuti
Occasional Contributor
4 years ago
Solved

How to get names of dropdown items from a TdxBarDropDownListBox object?

I am trying to get list item names and click on a specific item from a drop down list. But there is no way to find the names of the list items. The list parent object can be mapped but it has only one property related to the list items which is 'Count'. This shows the number of list items. The parent object also doesn't have any Child items. Can anyone please help me with getting this?

  • Try adding TdxBarDropDownListBox class in the text recognization and see whether Microsoft lib helps you to get the text object.

    If the above way dint help try adding the same class in MSAA list as well.

7 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    List items in a list box are not seperate items that are mapped.  They are in some property within the control itself.  Look to see if there is a wItemCount or wItem property.  Look, also, for perhaps something like "Items"

    • shejuti's avatar
      shejuti
      Occasional Contributor

      Hi,

      This listbox doesn't have names, display, text, wItemCount or wItem property. It has only 'Items' property but the value of that is only '(Object)'. There is no way to get the names. Is there any way to get the names from it?

      • anupamchampati's avatar
        anupamchampati
        Frequent Contributor

        1. Have you tried entering that Items Object and see any property in it?

        2. What is happening if you are trying to do record script for the same dropdown?

         

  • anupamchampati's avatar
    anupamchampati
    Frequent Contributor

    You have search for any property inside the Obj Spy for the names. 

    Generally I use to get the name under Items .. Names or Display or Text