Print spaces with Underline

  • Thread starter Thread starter Jon Jacobs
  • Start date Start date
J

Jon Jacobs

_Grp.DrawString(S, F, Brushes.Black, X, Y)

F is a font that included the underline style.
S is a string right-padded with spaces to give it a desired width.
Unfortunately, the undeline only appears witht the left part of the string.
All the trailing spaces are ignored.
I get around the problem by changing the final space to a period or
underscore, but this is very ugly.

Is there a way to force the underline to appear on the trailing spaces?

Thanks,
 
Jon Jacobs said:
_Grp.DrawString(S, F, Brushes.Black, X, Y)

F is a font that included the underline style.
S is a string right-padded with spaces to give it a desired width.
Unfortunately, the undeline only appears witht the left part of the
string.
All the trailing spaces are ignored.
I get around the problem by changing the final space to a period or
underscore, but this is very ugly.

Is there a way to force the underline to appear on the trailing spaces?

Try doing S.Replace(" ", Convert.ToChar(160))
 
Back
Top