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

Add items in listbox

Status
Not open for further replies.

ionutdinulescu

Programmer
Jun 11, 2002
59
GB
I have a listbox with 3 columns. I can only call AddItem to fill the first column. How can I fill the others two ?
I tried with the Column property but it doesn't work (seems that it can be used only for getting values).
 
Use a semi-colon separated item.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I'm assuming you're using a valueList for the listbox...

the rowsource is just a delimited string, which gets devided by the number of columns to determine which is in what column...

so just add "val1" & ";" & "val2" ...

I tend to use ; as delimiter, but , will do as well...

--------------------
Procrastinate Now!
 
Works fine. Now I would like to have an extra (hidden) column that holds an id. I set the columns number property on 3 but I add 4 columns. This turned out not to work. Do you have other solution instead of using an external array that hold the id's ?
 
you can explicitly set the width of every column in your list box, just set the hidden column to have a width of 0cm

columnWidth property, 0cm;1cm;1cm...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top