Results 1 to 5 of 5

Thread: how do i put bold text in a richtextbox

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    how do i put bold text in a richtextbox

    i cant seem to put bold text in a richtextbox in VB.NET...i dont know how to use the TRUE and FALSE there...hmm i can explain...i mean...it is not anymore like in vb6 wich i could say richtextbox1.selbold=true...how do i do the equivalent to that in vb.net? and in C#?

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    VB Code:
    1. Dim fnt As New Font(RichTextBox1.Font, FontStyle.Bold)
    2.         RichTextBox1.SelectionFont = fnt
    Baaaaaaaaah

  3. #3

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    tks ill try it

  4. #4

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    worked tks but how da hell would i guess that was the way to do that? vb6 was easy to guess how to do things here it sucks bad coz it is too hard :\

  5. #5
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    That's why you need some kind of tutorial.
    I knew who to create a font at fly and when I tryied to use

    RTB.SelectionFont.Bold = True

    It gave me an error message that the property was read-only. Samething with other properties of font. But when I look at the property "SelectionFont", it said you can use it to get or set the font is rich text box. So I created the font of fly and changed the whole font.
    These "features" really suck in VB .NET though.
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width