c#TextBox自定义包装

时间:2017-06-04 10:59:44

标签: c# winforms textbox wrapping

我有TextBox和多行字符串,例如:

var str = "First: q1=42, w2=sometext, q3=false\r\nSecond: some very very very very very111 very very very very long text text.";

TextBox Size.Width小。str。如果我将TextBox.Text粘贴到|First: q1=42, w2=sometext, q3=false | <- that is end of TextBox rectangle |Second: some very very very very | <- |very111 very very very very long text| <- text autowrapping to start of textbox area | text. | <-

|First: q1=42, w2=sometext, q3=false  | <- that is end of TextBox rectangle
|Second: some very very very very     | <- first line normal
|        very111 very very very very  | <- offset text after wrapping
|        long text text.              | <- on ("Second: ").Length points

我想要那个:

'\t'

至少,const值的偏移量(可能是importObject或3个空格)。

0 个答案:

没有答案