small lettering with number

roarnold

Active Member
Licensed User
Longtime User
I was wondering if I can make the "st" in 1st small and raised up to the height of the one (1).

Thanks,
R
 

agraham

Expert
Licensed User
Longtime User
B4X:
   ' formatting using embedded tokens
   rs.Initialize("{R}{T}{Blue}This{Blue}{T}{R} {R1}{SUP}{U}is{U}{SUP}{R1} another {Red}{BI}Rich{Red}String{BI}")
   
   rs.Color2(Colors.Blue,"{Blue}")
   rs.RelativeSize2(1.5, "{R}")
   rs.Typeface2("serif", "{T}")
   rs.Underscore2("{U}")
   rs.Color2(Colors.Red, "{Red}")   
   rs.Style2(rs.STYLE_BOLD_ITALIC, "{BI}")
   rs.Superscript2("{SUP}")
   rs.RelativeSize2(0.75, "{R1}")
   Label2.Text = rs
   
   Dim rs As RichString
   Dim rsb As RichStringBuilder   
   
   
   ' formatting using embedded tokens and the RichTextFormatter
   rs.Initialize("{R}{T}{Blue}This{Blue}{T}{R} {R1}{SUP}{U}is{U}{SUP}{R1} one more {Red}{BI}Rich{Red}String{BI}")
   rsf.Initialize("{sample}")

   rsf.AddToken("{R}", rsf.FORMAT_RELATIVESIZE, 1.5)
   rsf.AddToken("{T}", rsf.FORMAT_TYPEFACE, "serif")
   rsf.AddToken("{Blue}", rsf.FORMAT_COLOR, Colors.Blue)
   rsf.AddToken("{Red}", rsf.FORMAT_COLOR, Colors.Red)
   rsf.AddToken("{U}", rsf.FORMAT_UNDERSCORE, Null)
   rsf.AddToken("{BI}", rsf.FORMAT_STYLE, rsf.STYLE_BOLD_ITALIC)
   rsf.AddToken("{SUP}", rsf.FORMAT_SUPERSCRIPT, Null)
   rsf.AddToken("{R1}", rsf.FORMAT_RELATIVESIZE, 0.75)
   rs = rsf.Format(rs)
   Label3.Text = rs
 
Upvote 0
Top