Click here to Skip to main content
15,887,854 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Subscript literal Pin
Mycroft Holmes2-Nov-10 21:19
professionalMycroft Holmes2-Nov-10 21:19 
GeneralRe: Subscript literal Pin
Martijn Boeker3-Nov-10 12:15
Martijn Boeker3-Nov-10 12:15 
GeneralRe: Subscript literal Pin
Mycroft Holmes3-Nov-10 12:52
professionalMycroft Holmes3-Nov-10 12:52 
GeneralRe: Subscript literal Pin
Martijn Boeker3-Nov-10 13:16
Martijn Boeker3-Nov-10 13:16 
QuestionHow to send redraw message to background windows Pin
manchukuo2-Nov-10 8:30
manchukuo2-Nov-10 8:30 
AnswerRe: How to send redraw message to background windows Pin
kevinnicol2-Nov-10 9:00
kevinnicol2-Nov-10 9:00 
AnswerRe: How to send redraw message to background windows Pin
Luc Pattyn2-Nov-10 9:34
sitebuilderLuc Pattyn2-Nov-10 9:34 
QuestionPrint a file on printer Pin
abbd2-Nov-10 7:31
abbd2-Nov-10 7:31 

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.