#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    9
    Rep Power
    0

    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

    pls help...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Portugal
    Posts
    106
    Rep Power
    12
    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
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    9
    Rep Power
    0
    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.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Portugal
    Posts
    106
    Rep Power
    12
    weird... it worked exactly as I typed in my asp.net app
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    9
    Rep Power
    0
    i forgot, it's for c#... but i already know the answer (from another forum)

    new Font(textBox1.Font, FontStyle.Bold | FontStyle.Italic)
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2014
    Posts
    1
    Rep Power
    0

    Thumbs up Thanks!


    Thanks! You provided the answer I was looking for.

IMN logo majestic logo threadwatch logo seochat tools logo