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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6 combobox features 1

Status
Not open for further replies.

trimtrom

Programmer
Dec 12, 2003
35
0
0
GB
hello,

I am a VB 6 beginner.

Access and Foxpro have a combobox that has multiple columns in the list portion, and you can select any one of the columns to be the databound field. I am looking for these features in VB, but as far as I can see with the standard VB combo or datacombo you can have only one column in the dropdown, even if you can have a different related field as databound. Is this correct?

If my supposition is correct, and the standard VB comboxes are very limited, does anyone know where I can look for a freeware VB ActiveX combobox control which does have a multicolumn dropdown list, and a selectable databound field???

Many thanks,
Trimtrom
 
The functionality you mention is provided to Access and Foxpro by the Microsoft Forms 2.0 Object library. You can actually use this in VB as well by adding the library as a component.

Note, however, that there are restrictions on redistributing the library (technically you can't). If redistribution is an issue (e.g. your target PCs don't have Office 97 or later installed) do a keyword searvh in this forum for previous discussion of this and ideas on how to address it.
 
hi,
Thanks for the reply.

I think I would like to go with the forms 2 library. However, I find that when I add the library, and then try to drag the new combobox onto a datagrid I'm using (so that it appears on top of a datagrid cell), it disappears underneath the grid. It won't appear on top at runtime either.

Why does it hide underneath?

Thanks,
Trimtrom
 
Right Click on the data grid and click Send To Back.
 
Hi,

You could put the ComboBox in a PictureBox (and resize the PictureBox to be the same size as the Combo) and place it on the DataGrid. The PictureBox would appear on top of the DataGrid at in design view and at runtime.

Hope this helps.

Harleyquinn
 
Sadly you've made explicit some requirements that you originally didn't mention: wanting the custom combobox to sit above another VB control; Forms 2 isn't guaranteed to work 'as expected' in VB - one example of this non-standard behaviour is that most of the controls in the library live on a lower graphical layer than the built-in VB controls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top