3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by ddanbe
2

short answer: you can't.

long answer: superscript and subscript are font properties, a string only stores characters, it doesnt store any formatting data.

You would need to apply the subscript or superscript when you display the text, in a label/terxtbox/printed format/etc. This is when you would apply the sub/super scripting. You could use a character to denote which letters should be super/sub script. Then parse the string to find the special markers when formatting for display. Something like string superSub = "this ^super^ string is |sub| par" Then when you display the string you search for sections between '^'s and superscript it and subscript anything between '|'s.
You can check out FontVariants over at msdn for one way to apply the formatting.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.