StringBuilder.AppendFormat() to underline text

  • Thread starter Thread starter John A Grandy
  • Start date Start date
J

John A Grandy

when using StringBuilder to build-up a block of text (which is then assigned
to a Label control) is it possible to underline a portion of the text ?

it would seem that StringBuilder.AppendFormat() would provide this
capability, but I can't find documentation on the proper format specifier to
underline a string ...

if this is possible, could someone please provide an example? thanks.
 
John A Grandy said:
when using StringBuilder to build-up a block of text (which is then assigned
to a Label control) is it possible to underline a portion of the text ?

it would seem that StringBuilder.AppendFormat() would provide this
capability, but I can't find documentation on the proper format specifier to
underline a string ...

if this is possible, could someone please provide an example? thanks.


At first glance, the underline has always been a property of the Font,
not of the string of characters. As far as I can tell, the formating for
AppendFormat also does not include Font information, only things
like the currency symbol, decimal point, number of digits to the right
of the decimal point, and so on....

Underline is a decoration applied only when you output the data to a
display device, like a screen or monitor, it is not a part of the character
data.


LFS
 
hmmm .... if one is programmatically dynamically composing a section of text
that is meant to "flow freely" (be assigned to an auto-word-wrapping control
such as a Lable or a Span) then it's not possible to underline a sport of
that text ....
 

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