formating strings into 2 columns

  • Thread starter Thread starter active
  • Start date Start date
A

active

I draw the following string in a picturebox

LocaleInfo = Msg.PadRight(50, "."c) & buf

It's as close as I can get to having two columns.

Because all characters are not the same width what I get is a ragged second
column

Is there a simple way to get two columns.

I could measure Msg and work from there but I'd hate to do that and then
find out DotNet could do it for me.



Thanks

Cal
 
* " active said:
I draw the following string in a picturebox

LocaleInfo = Msg.PadRight(50, "."c) & buf

It's as close as I can get to having two columns.

Because all characters are not the same width what I get is a ragged second
column

Is there a simple way to get two columns.

I could measure Msg and work from there but I'd hate to do that and then
find out DotNet could do it for me.

There is no clearn way to do that. You will have to draw the different
parts of the string one after the other to get exact positioning.
 
thanks
cal
Herfried K. Wagner said:
There is no clearn way to do that. You will have to draw the different
parts of the string one after the other to get exact positioning.
 
"a" & vbTab & "b" & vbTab & vbTab & "c" & vbTab & "d" & vbCrLf & "a" & vbTab
& "b" & vbTab & vbTab & "c" & vbTab & "d" & vbCrLf



I drew the above in a picturebox and the tabs behaved as one would like.

That is I got columns and the space between the b and the c was twice the
space in the other two columns.



Seems to me that the picturebox handles CRLF's and TAB's.

Anyone (HerFried?) know how to set tab positions in a picturebox??



Cal



PS

Picturebox has a ResetText method but no Text property. I guess it gets one
from Control. Anyone know if Text is used for anything (The ResetText
implies it is)
 
Back
Top