lam*_*mba 4 python user-interface wxpython
我有一个多行,在wxpython中只读TextCtrl我知道如何使用设置值
myTextCtrl.SetValue('hello')
Run Code Online (Sandbox Code Playgroud)
但是这会改变我之前在TextCtrl中的所有内容......如何添加新行并保留以前的所有内容?
无论是widget.AppendText或widget.WriteText每次都会写一个新的行,如果你有一个换行符发送您的字符串(如"你好\ N")
AppendText,将文本附加到控件中文本的末尾.WriteText是相同的,因为新文本放在当前插入点.