Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

this.Text = "Killing" + me.ToString();

Status
Not open for further replies.

wher0001

Programmer
Aug 13, 2008
6
US
Yes, I know I am not the smartest apple in the bunch.
I am using a StringBuilder to try and get bold and non-bold characters together in the Form.Text field. Am I going to have to do something with the OnPaint Method or is this just super easy and I am super slow at catching on?

Trying to get --> THISSUCKS into this.Text;

System.Text.StringBuilder ControlBarText = new System.Text.StringBuilder( "" );
ControlBarText.AppendFormat(IFormatProvider. "<strong>");
ControlBarText.Append( "<strong>" );
ControlBarText.Append( "THIS" );
ControlBarText.Append( "</strong>" );
ControlBarText.Append( "SUCKS" );
ControlBarText.Append( appendText );
this.Text = ControlBarText.ToString();

 
This code compilers OK without any errors?
Also i am not sure if you can format the form's title (.text property)
 
ControlBarText.AppendFormat(IFormatProvider. "<strong>"); was commented out in my code and appendText was a string passed from another function.

With those two exceptions, yes the code compiles. I beleive you are right that this cannot be done. I have checked numersous threads with the same response.

I have since made my own control bar from a bitmap in Gimp and I use that instead.

Thanks for your help, I wish C# was a little less structured sometimes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top