By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

String With fixed Length

P: n/a
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.
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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/de...umnheaders.asp
Ken
-------------------
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
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.

Nov 21 '05 #2

P: n/a
J L
Won't the padright function do this for you?

John

On Sun, 3 Apr 2005 17:42:46 +0800, "Agnes" <ag***@dynamictech.com.hk>
wrote:
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.


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.