Click here to Skip to main content
15,911,482 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to convert ToolStripButton to control? PinPopular
Alan N3-Nov-10 6:10
Alan N3-Nov-10 6:10 
Questionsend record from the datagridview to next page Pin
annie_bel3-Nov-10 1:40
annie_bel3-Nov-10 1:40 
AnswerRe: send record from the datagridview to next page Pin
Calla3-Nov-10 1:48
Calla3-Nov-10 1:48 
QuestionUnable to cast object from webservice Pin
il_manti3-Nov-10 1:24
il_manti3-Nov-10 1:24 
AnswerRe: Unable to cast object from webservice [modified] Pin
Keith Barrow3-Nov-10 2:01
professionalKeith Barrow3-Nov-10 2:01 
AnswerRe: Unable to cast object from webservice Pin
Pete O'Hanlon3-Nov-10 2:03
mvePete O'Hanlon3-Nov-10 2:03 
AnswerRe: Unable to cast object from webservice Pin
OriginalGriff3-Nov-10 2:04
mveOriginalGriff3-Nov-10 2:04 
AnswerRe: Unable to cast object from webservice Pin
il_manti3-Nov-10 2:08
il_manti3-Nov-10 2:08 
AnswerRe: Unable to cast object from webservice Pin
Bernhard Hiller3-Nov-10 22:56
Bernhard Hiller3-Nov-10 22:56 
Questionhow to compose a content with php Pin
zendprince2-Nov-10 19:44
zendprince2-Nov-10 19:44 
AnswerMy Vote of 1 Pin
Keith Barrow2-Nov-10 20:56
professionalKeith Barrow2-Nov-10 20:56 
AnswerRe: how to compose a content with php Pin
Smithers-Jones2-Nov-10 21:49
Smithers-Jones2-Nov-10 21:49 
QuestionSubscript literal Pin
Martijn Boeker2-Nov-10 10:47
Martijn Boeker2-Nov-10 10:47 
AnswerRe: Subscript literal Pin
Ennis Ray Lynch, Jr.2-Nov-10 10:53
Ennis Ray Lynch, Jr.2-Nov-10 10:53 
GeneralRe: Subscript literal Pin
Martijn Boeker2-Nov-10 11:53
Martijn Boeker2-Nov-10 11:53 
AnswerRe: Subscript literal Pin
Luc Pattyn2-Nov-10 11:30
sitebuilderLuc Pattyn2-Nov-10 11:30 
There is no such thing as style, size, color, ... in a regular string, as a string is just a sequence of characters, without any style, size, color... attached to them. So if you want some formatting, it will have to be tailored to and handled by the target.

I can think of three ways to render a text with some non-homogeneous style attributes:

1. use the special characters in the font; this only works in limited cases, however it may suit your needs as there are some subscript and superscript digits in most fonts, and they have Unicode numbers.

2. use a Control that knows how to handle partial formatting; BTW that is what you did in your question, by using <sub> tags. A WebBrowser control knows how to handle them; a RichTextBox would deal with RTF commands; etc.

3. paint it yourself, using the Graphics class (assuming you're rendering to a Windows Form).

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


modified on Tuesday, November 2, 2010 6:26 PM

GeneralRe: Subscript literal Pin
Martijn Boeker2-Nov-10 11:58
Martijn Boeker2-Nov-10 11:58 
GeneralRe: Subscript literal Pin
Martijn Boeker2-Nov-10 12:58
Martijn Boeker2-Nov-10 12:58 
GeneralRe: Subscript literal Pin
Dave Kreskowiak2-Nov-10 14:05
mveDave Kreskowiak2-Nov-10 14:05 
GeneralRe: Subscript literal Pin
Martijn Boeker2-Nov-10 14:47
Martijn Boeker2-Nov-10 14:47 
GeneralRe: Subscript literal Pin
AspDotNetDev2-Nov-10 14:59
protectorAspDotNetDev2-Nov-10 14:59 
GeneralRe: Subscript literal Pin
Martijn Boeker2-Nov-10 15:13
Martijn Boeker2-Nov-10 15:13 
GeneralRe: Subscript literal Pin
AspDotNetDev2-Nov-10 15:29
protectorAspDotNetDev2-Nov-10 15:29 
GeneralRe: Subscript literal Pin
Martijn Boeker2-Nov-10 15:36
Martijn Boeker2-Nov-10 15:36 
GeneralRe: Subscript literal Pin
Richard A. Dalton3-Nov-10 3:43
Richard A. Dalton3-Nov-10 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.