I need to put some subtext in a Winforms C# labels .Text property. Is there any easy way to do this without writng my own control?
This would be the example in HTML
<sub>1a</sub>
Thanks,
Paul.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a link to an already-written control that does exactly this:
http://www.freshnova.com/C-Tutorials/superscript-subscript-label.html
Update: you can also just use a RichTextBox (with BorderStyle none, BackColor control, and ReadOnly true). The RichTextBox’s
SelectionCharOffsetlets you specify the height of text above or below the baseline in pixels, and then set itsSelectedTextproperty after each setting ofSelectionCharOffsetto mix-and-match text of different positions in the one box.