Forum Discussion

TESTUS's avatar
TESTUS
Contributor
15 years ago

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

  • 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).