November 4th, 2003, 06: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, 10: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 4th, 2003, 11:57 PM
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 12:06 AM.
November 5th, 2003, 10:00 AM
weird... it worked exactly as I typed in my asp.net app
November 5th, 2003, 04: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, 01:32 PM
Thanks! You provided the answer I was looking for.