String With fixed Length

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

i use myreader to get the data, and I want to display in the listbox .
myReader.item("productname) & " - " & myReader.item("color")
Some product name got 15 chars , some is 25 chars.
How can I display it in fixed lenght. e.g 30 chars ?
I want my data display like
TOYS RED
TELEPPHONE BLUE
....... RED
^^^^^^^^^^^^^^^^
FIXED COLUMN.
I CANNOT USE DATAGRID, BECUASE, i NEED TO SELECT FROM 5 different tables.
That's why I use Listbox.
thanks a lot.
 
Hi,

I think a listview with it view set to details would be a better
choice because it has columns.

http://msdn.microsoft.com/library/d...en-us/vbcon/html/vbconaddingcolumnheaders.asp


Ken
-------------------
i use myreader to get the data, and I want to display in the listbox .
myReader.item("productname) & " - " & myReader.item("color")
Some product name got 15 chars , some is 25 chars.
How can I display it in fixed lenght. e.g 30 chars ?
I want my data display like
TOYS RED
TELEPPHONE BLUE
....... RED
^^^^^^^^^^^^^^^^
FIXED COLUMN.
I CANNOT USE DATAGRID, BECUASE, i NEED TO SELECT FROM 5 different tables.
That's why I use Listbox.
thanks a lot.
 

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

Back
Top