Click here to Skip to main content
12,251,889 members (60,959 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB VB.NET
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 13-May-12 19:54pm
Comments
SAKryukov 14-May-12 2:03am
   
Tag it: WPF? Forms? ASP.NET? Silverlight?
--SA

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160426.1 | Last Updated 14 May 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100