Reputation: 11
Can anyone correct me on what is wrong with this code? I can't add a new line inside Richtextbox control
Dim sb = New System.Text.StringBuilder()
sb.Append("{\rtf1\ansi")
sb.Append("\b " & TextBox2.Text & "\b0" & Environment.NewLine & "my body")
sb.Append("}")
Textbox.Rtf = sb.ToString
Upvotes: 0
Views: 374
Reputation: 81675
Because you aren't using rtf codes. Try:
sb.Append("\b " & TextBox2.Text & "\b0\par my body")
Upvotes: 1