tags:

views:

227

answers:

2

Is there a way to extend the number of items that appear in the VB6 combo instinsic control, when it drops down? I have about 10 items and I'd like to show them all.

+2  A: 

This code at Karl Peterson's classic VB website will automatically size the combo box to match the number of elements:

http://vb.mvps.org/samples/FullDrop/

Robert Harvey
+1 - though the rep points should go to Karl himself:) http://stackoverflow.com/users/121018/karl-e-peterson
MarkJ
A: 

I've used the code here, and can confirm that it works as advertised. If you remove the last SendMessage call, it won't actually dropdown until the user clicks on it.

http://vbnet.mvps.org/index.html?code/comboapi/comboheight.htm

JeffK