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

Cannot align columns in list box

P: n/a
I am using the String.Format(....) to print 3 strings into a listbox,
DIM fmtStr as string = "{0,-20}{1,10}{2,10}"

However, the strings do not align all well in the list box.
The first and last string align good but not the second line.

eg.

John $500 Full
Peter $10 Full
Mary $30 Full
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try changing the font to a true type.

"Alan" <al*******@yahoo.com.au> wrote in message
news:ui****************@TK2MSFTNGP10.phx.gbl...
I am using the String.Format(....) to print 3 strings into a listbox,
DIM fmtStr as string = "{0,-20}{1,10}{2,10}"

However, the strings do not align all well in the list box.
The first and last string align good but not the second line.

eg.

John $500 Full
Peter $10 Full
Mary $30 Full

Nov 20 '05 #2

P: n/a
* "Alan" <al*******@yahoo.com.au> scripsit:
I am using the String.Format(....) to print 3 strings into a listbox,
DIM fmtStr as string = "{0,-20}{1,10}{2,10}"

However, the strings do not align all well in the list box.
The first and last string align good but not the second line.

eg.

John $500 Full
Peter $10 Full
Mary $30 Full


Are you sure you are using a monospace font?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.