473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

StringBuilder.AppendFormat() to underline text

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.

Nov 21 '05 #1
2 7820

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote
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
Nov 21 '05 #2
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 ....

"Larry Serflaten" <se*******@usinternet.com> wrote in message
news:u9****************@TK2MSFTNGP15.phx.gbl...

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote
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

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Schley Andrew Kutz | last post by:
I am iterating through 454 rows of a table and with each row I use the ID field to form a URI for a contact in a public folder on my exchange server. My memory keeps growing though. I think it...
1
by: ola | last post by:
How can I replace the character literals in the stringbuider below with variables? StringBuilder sData = new StringBuilder("<CABDETAILS CabNumber=\"43877\" CabSKU=\"6633\" ExpDate=\"0106\" />");...
6
by: Paulb1us | last post by:
I am writing a DataTable to a file using a stringbuilder. The Format of the date in the table is like this: '12/20/04' But after I write it to the file it ads the time: '12/20/04 12:00:00 AM' ...
3
by: Mariano | last post by:
Hi, Can a StringBuilder buffer be cleared? I'm confused. It is supposed that the StringBuilder class, can deal with all the memory allocation and deallocation needed for normal string operations...
0
by: John A Grandy | last post by:
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...
33
by: genc_ymeri | last post by:
Hi over there, Propably this subject is discussed over and over several times. I did google it too but I was a little bit surprised what I read on internet when it comes 'when to use what'. Most...
0
gchq
by: gchq | last post by:
Hi there I'm attempting to put together a string that will line up in columns and then insert this into a pdf form! I've managed this before, but for some reason the columns do not line up this...
8
by: Soulless | last post by:
I am trying to implement the stringbuilder class by taking a LARGE multiline text box and looping through the lines and build a string and include \r\n in it. I get : Index was outside the...
3
by: shapper | last post by:
Hello, I am creating the body of a mail message to be sent using StringBuilder: StringBuilder body = new StringBuilder(); body.AppendFormat("{0},", userName); body.AppendLine();...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.