formatting listbox into columns

H

headware

I'm trying to list data that is really best put into a table, but I
need easy multi-select functionality, so I'm trying to go with a
listbox. I attempted to use the PadRight() function of the string
class to get the data to separate into columns, but the listbox seems
to turn all the extra spaces into one space by the time it gets
rendered. It only does this with spaces though. If I use another
character like '.' it will work correctly but it looks awful. I saw a
post on here that was put up a while ago in which someone had the
exact problem I'm having, but no one gave him a solution that would
work. Does anyone know of a way to do this?

Thanks,
Dave
 
A

Alvin Bruney

why don't u use a textbox. set the rows to multi-select and then set the
colum property to 2. then you can get the text to fall into the two columns.
 
H

headware

Well, there is no mutli-select functionality for a textbox as far as I
know. There is a multi-line option, but that's different. Also, the
Columns property really is misleadingly named. All that specifies is
how many characters will fit in single row of text in the box. It
should be called LineWidth or something like that.

I really need the mutli-select functionality of the listbox. Someone
suggested that you could use " " instead of spaces in the listbox
text value. However, when I tried to do this it turned the   into
" " so it would end up actually displaying " " in the
text of the items. Is there any way to shut that off? There must be
some way to put extra spaces into listbox text items!
 

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

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top