0

i 've declared a string str, and initialize str with a value as IT s1s2 26, i.e

String str;
str="IT s1s2 26";

normally it prints like this as usual IT s1s2 26

what i want is that :i want the str value to be at the str itself but during printing i want to see IT s1s2 with a font size 12 and the number 26 with a font size 16........

can anyone tell me how to do that.........

Edited by Jessurider: n/a

4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by Jessurider
0

In a Console app this is not possible. Are you using a Forms app?
To do it you have to cut your string in two. Look for the method Substring of the String class how to do that. See on MSDN.

0

you could try html in the code like so

String str;
      str="<html>IT s1s2 <h1>26</h1></html>";

That will change the size to make it a header, but I do not know how to set the size in html. I'm sure you could find it.

1

Where are you displaying the String? In a text component or where?
Different components have different ways of displaying text.

0

you could try html in the code like so

String str;
      str="<html>IT s1s2 <h1>26</h1></html>";

That will change the size to make it a header, but I do not know how to set the size in html. I'm sure you could find it.

thanks sir this code works beautifully............

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.