Search code examples
comboboxvb6

Combo box displays numeric values as squares


I have a simple combo box that I've prepopulated with numeric values (eg. 1, 2, 3, etc.). When I run my app and drop-down the list, all I see is little squares instead of numbers.

Is this some kind of character set issue?

This sample code creates the effect in both the IDE and when run.


Solution

  • I have discovered that adding the combobox list entries using the IDE is the cause of the problem. So, for example, in the IDE go to the Properties tab, click on the (List) property, and key the entries (eg 1 followed by CTRL-ENTER followed by 2 followed by CTRL-ENTER, etc). This produces the defective 'square boxes effect'.

    If you add the entries to the list programmatically, there is no problem.