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

populating listbox

Status
Not open for further replies.

calvi

Technical User
May 26, 2003
87
NL
I have populated a listbox with database from a stored procedure, which selects all columns from a table. But in the listbox itself I only get the first column. There is a property that you can set amount of column in the listbox. When I set this to a few columns, then it will show some columns with their values in 1 row, but I want the columns to be shown in the listbox as rows that display beneath each other. Is this possible in VB 6/VBA?
 
The standard ListBox supplied with vb6 only really supports one column. It can be made to appear to show more than one column by using a fixed space font or by inserting tabs into the text placed in the single column.

There are some custom ListBox controls available which do support multiple columns. Some may be free.

You may also consider use of the ListView control or the FlexGrid Controls which are supplied with (most versions) of vb6.

HTH Hugh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top