Ask a Question

Error: The CBS_HASSTRINGS style was not applied to the combo box.

TESTUS
Contributor

Error: The CBS_HASSTRINGS style was not applied to the combo box.

We are using an ImageCombobox in our VB6 Project. Now I want to select an item by its name:



Aliases
.<AliasPath>.combobox_System.ClickItem("System1")



This leads to the follwíng Error : The CBS_HASSTRINGS style was not applied to the combo box.

In the remarks-field the follwing can be read: The wItem, wItemList and wText properties will return an empty string.



If I try to select the Item by its index, it works fine (Aliases.<AliasPath>.combobox_System.ClickItem(0))



How can I select the combobox item by its name?


1 REPLY 1
YMinaev
Staff

RE: Error: The CBS_HASSTRINGS style was not applied to the combo box.

Hi,



Your combo box doesn't store items as strings. You need to use indexes to address them (see the "OWNERDRAW Controls Support" help topic).
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: