Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

I am making a project in which i need to display something like this : XIth ,6th ,7th where 'th' should be in superscript.I tried a lot but am not getting it . Plz help...
Posted
Comments
Sergey Alexandrovich Kryukov 14-May-12 2:03am    
Tag it: WPF? Forms? ASP.NET? Silverlight?
--SA

1 solution

Plain text, Unicode do not define subscripts/superscripts for every character. You need some kind of formatting text. If this is HTML, this is trivial: you can use <sub> or <sup> elements: 6th, 7th

(Why, why did you neglect to tag application type or UI library you use?! don't blame me for an approximate answer, find further detail by yourself.)

If this is not a Web application or some HTML document generated by your application, you can use rich text box (exact type depends on you UI library, look it up).

Also, there are some components on the CodeProject which allow to render HTML in your Windows application:
A Professional HTML Renderer You Will Use[^],
WPF HTML Supported TextBlock[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900