datacombo list items number setting

michelle_chall
12-14-2001, 10:03 PM
i've been struggling to set the number of list items to show in a drop down datacombo box. the default seems to show space for 8 listitems but i only have 2 from my datasource & i don't want to see the remaining 6 redundant items displayed as empty spaces when i dropdown. is there a property setting to fix the number of items to display on dropdown as i have searched them all & none seems appropriate??

Ales Zigon
12-15-2001, 06:23 AM
Don't take it for granted but I think you'll have to subclass it.
Search the forum for the "Subclassing" and I'm sure you'll find something usefull. I think Thinker wrote a tutorial about htis (might be wrong about the poster, though!)

Thinker
12-15-2001, 12:17 PM
Nope, I didn't write any tutorial about subclassing - The Hand is the resident
subclassing Guru and others (Like Banjo) have placed tutorials in Tutor's
Corner on this subject.

It is doubtful that subclassing will help much here unless it is taken to the
extreme. If there were a message that could be sent to the DataCombo via
SendMessage, to set its drop-down height, that would be the way to go.
Since I don't even see any such messages for the standard Combobox, I
wonder if they exist for the DataCombo either.

Ales Zigon
12-15-2001, 01:37 PM
Sorry for that. It just crossed my mind it could be you.
About sublassing the combo - I've seen something like that somewhere on the net but can't remember where! I'll do a search for it and post back. OK?

Flyguy
12-17-2001, 01:44 AM
This link (http://www.mvps.org/vb/code/FullDrop.zip) is a sample project (by Karl E. Peterson) for a normal combobox, maybe you can use it.

michelle_chall
12-24-2001, 09:17 PM
thanks guys, perhaps i shall stick with a datalist control for the moment & see if i encounter anything about this later on.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum