Ask a Question

PB12 - How to work with combobox/dropdown/panel(combobox)


PB12 - How to work with combobox/dropdown/panel(combobox)

I have read alot of sites but didnt found any solution πŸ˜• how to solve these problems:


Problem number 1(attachemnts with "p1"):

I have a object ComboBox("rodzaj") that have properties like wItem,wItemCount,wSelectedItem but still its not posibble to select any item from the list. If i read wSelectedItem property it always giving "-1" in ouput even if i change selected item.

Refresh() not helps - looks like TC "remember" selected as default value.


Log.Message(ComboBox.wSelectedItem)#Always "-1"

 If i try:


I get that error:

TypeError 'IDispatchIndexedPropertyWrapper' object is not callable

Problem nr 2(attachemnts with "p2"):

In this case our "combobox" is a panel and I have no clue how to choose a specific value from it.

Problem nr 3(attachemnts with "p3"):

In this case we have to work with dropdown object, I have no clue how to choose a specific value from it.


Actually in every case I am using "down" keys but as we know its weak solution.

I already seen that:


I would be very grateful for your help





We have tried with  developer set AccessibilityName for combobox and parent below in properties

as it's said on "Configuring PowerBuilder Application" section. (We already has before AccessibilityRole as "defaultrole!")

But still its all the same just combobox its not anymore "rodzaj" in object browser cause i see AccessibilityName there (we gave AccessibilityName  to ComboBox = 'www'').


I have no problems with all the rest objects.



PS. On this page:

is an example and combobox there is a Window.

frmSFExample.Window("ComboBox", "", 2).ClickItem("state");

In our application it looks like:

Window("pbdw120", "", 12).ComboBox("rodzaj")



I asked dev if he can make for me example with combobox insinde window  to try  make it looks like:

frmSFExample.Window("ComboBox", "", 2)

I'll know if it helps in monday.


So if inside combobox is a datawindow its not posibble to click an item by index or name. (for example DropDownDW - in PB)


If  combobox is inside window and it have a rigid list we are able to use ClickItem method.


So if ur combobox dosent look like:

parent.Window("ComboBox", "", 1)

you wont be able to open it and click specific item.



I have an app where i can use clicitem on combobox. I see wItemList but only on simple comboboxes that no need get data from database.


Dev told me that they use that kind of object (combobox with dw) because then they are able to keep "hidden value" like ident or some unique parametr.

If  we would like to change that then we need alot of functions that gonna "map" selected string for some int/ident parameter.


So GG&HF but our tests have to be crappy with comboboxes usage;)


Does the data driven combobox have a property like "DataSource" or "ListSource" or "LookupTable"?


I have Delphi dropdowns (and some Grids) which are driven by datasets and I have to refer to the datasource in most cases to drive them.

Developer said that there is not anything like that.

The only way  to get data is put DataWindow inside combobox cause DataWindow is "datasource" in PB.


There is way to make combobox  cooperate with TC but it would take too much time.

Put DataWindow somewhere in a window as hidden object and  let it communicate with combobox, so combobox would create a list based on that.



Well thanks for help for all of you πŸ™‚

Showing results forΒ 
Search instead forΒ 
Did you mean:Β