Results 1 to 2 of 2

Thread: how set different line of text with different font type in Richtextbox

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Question how set different line of text with different font type in Richtextbox

    how to set each line with different font type in richTextbox?? i only can set the whole text within the richtextbox....how to do that?

    VB Code:
    1. RichTextBox1.Text &= TextBox1.Text & vbCrLf
    2. RichTextBox1.Font = New Font(New FontFamily("Arial"), 10, FontStyle.Underline)

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: how set different line of text with different font type in Richtextbox

    Selectionstart and selectionlength properties can be used to select the start character and length in characters of the selection in an RTB. You can then apply the font to the selection (selectionfont property).

    Read my post here.

    zaza

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