Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox only showing one item

Status
Not open for further replies.

Rewbs

Programmer
May 1, 2002
18
GB
Hi all,

I'm filling a ComboBox called f0ParamList with Addstring as follows:

CString sParm;
for (int i = 0; i < numParams; i++)
{
sParm.Format(&quot;%d: &quot;, i);
int idx = (myDialog->m_f0ParamList).AddString(sParm);
}

At this point, (myDialog->m_f0ParamList).GetCount() returns 8 as expected, but the comboBox itself (a dropdown list) only shows one item.

Any thoughts on what could be causing this?

Cheers,
Rewbs.

 
>> Any thoughts on what could be causing this?

does it have a vertical scrollbar?

could be you need to resize it in the resource editor

-pete
 
Combos are a pain. You can select them in 2 ways. Clcik on the little arrow and resize it by dragging the combo box to a longer vertical height. This will not change the combo box appearance but instead, change the dropdown list size. By default, that list is the size of the combo box (unless you drew it really tall)

Matt
 
Brilliant - that was the problem. Can't believe I spent so much time on this!! :)

Cheers,
Rewbs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top