添加新行 Richtextbox

问题描述

谁能纠正我这段代码有什么问题? 我无法在 RichtextBox 控件中添加新行

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

解决方法

因为您没有使用 rtf 代码。试试:

No overload matches this call.
  Argument of type '["CheckLists"]' is not assignable to parameter of type 'undefined extends T["CheckLists"] ? ["CheckLists"] | ["CheckLists",T["CheckLists"]] : ["CheckLists",T["CheckLists"]]'.
  Overload 2 of 2,'(route: { key: string; params?: T[keyof T] | undefined; } | { name: keyof T; key?: string | undefined; params: T[keyof T]; }): void',gave the following error.
    Argument of type 'string' is not assignable to parameter of type '{ key: string; params?: T[keyof T] | undefined; } | { name: keyof T; key?: string | undefined; params: T[keyof T]; }'