Listbox with no Horizontal Scroll

G

GeorgeMar

I have a Listbox with 3 Columns. I need the information in all three
columns. So I get the data in column 2 and 3 from listbox.Column(1) and
listbox.Column(2) respectively. However, I don't want the end user to see
column 2 and 3. I only want column 1 i.e column(0) to display.

Unfortunately, because I have 3 columns, I now get a horizontal scroll bar.

Is there any way to not get the Horizontal scroll bar? Or is there any
other way of getting the two columns without displaying them?

many thanks
george
 
D

Douglas J. Steele

Set the ColumnWidths property to something like 1";0;0 (or whatever width
you want for the first column). That'll be the only column shown in the list
box, but as long as you've set the ColumnCount to 3, you'll still be able to
refer to the other two values programmatically.
 
G

GeorgeMar

Thank You Douglas. You have saved my day!

Douglas J. Steele said:
Set the ColumnWidths property to something like 1";0;0 (or whatever width
you want for the first column). That'll be the only column shown in the list
box, but as long as you've set the ColumnCount to 3, you'll still be able to
refer to the other two values programmatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top