November 4th, 2003, 07:45 PM
setting textbox font to bold and italic
i know this works: textbox.Font = new Font(this.Font, FontStyle.Bold);
but i want to changethe font into bold and italic at the same time
November 4th, 2003, 11:18 PM
TextBox1.Font.Bold = true;
TextBox1.Font.Italic = true;
Most of the time the easiest solution is right there in front of you and you miss it
November 5th, 2003, 12:57 AM
i tried it but I get the message that System.Drawing.Font.Bold and .Italic are readonly and cannot be modified...
Last edited by arbalest; November 5th, 2003 at 01:06 AM.
November 5th, 2003, 11:00 AM
weird... it worked exactly as I typed in my asp.net app
November 5th, 2003, 05:21 PM
i forgot, it's for c#... but i already know the answer (from another forum)
new Font(textBox1.Font, FontStyle.Bold | FontStyle.Italic)
March 13th, 2014, 02:32 PM
Thanks! You provided the answer I was looking for.