Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need the lable to have text like "cm^2" and "M_1". How do i do that? For now i used two labels "cm" an "2", first was size 10, second was 7 and i move the labels to look how i wanted. And put the second one to front and set the back color under web to transparent.

Some of the programs allow to use string like: M_{\rm 1} and you get the "1" subscripted to "M".
Posted
Updated 22-May-16 1:29am

I have fixed this by diving this into 2 parts and subscripted part has smaller part and it's put next to first label in the right position.
 
Share this answer
 
The label control uses a single font, but you can include superscript characters that are available in that font. Check the Windows Character Map application to see whether the characters you require are available. For example, I was able to create a label with the text: Label².
 
Share this answer
 
Comments
Member 4347041 12-Apr-13 6:36am    
I have try it/use it for numbers and a few characters, but i need for example write this "A_s,min,i" the "s,min,i" is subscripted.
Richard MacCutchan 12-Apr-13 6:57am    
I don't think you can do that without a font that has superscript versions of those characters, or by implementing an override of the default Paint method for a label.

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