Visual Basic richtextbox - setting specific text to Italic font style

后端 未结 3 1975
庸人自扰
庸人自扰 2021-01-25 09:56

I have created a Richtextbox, which produces text based on user-inputted variables as well as some basic formatting - eg:

name = txtname.text
richtextbox1.text =         


        
3条回答
  •  星月不相逢
    2021-01-25 10:57

    Dim BO As New Font("Arial", 12, FontStyle.italic) ' Italic
      richtextbox1.text = "Hello my name is " 
      richtextbox1.selectionfont = BO
      richtextbox1.appendtext(name)
    

    Hope this helps

提交回复
热议问题