wxpython add line to TextCtrl

前端 未结 3 1586
没有蜡笔的小新
没有蜡笔的小新 2021-01-19 05:46

I have a multi line, read only TextCtrl in wxpython I know how to set values using

myTextCtrl.SetValue(\'hello\')

But this will change wha

3条回答
  •  礼貌的吻别
    2021-01-19 06:38

    Either widget.AppendText or widget.WriteText will write a new line each time if you send your string with a newline character (like 'hello\n')

    AppendText, would append the text at the end of the text in the control. WriteText is the same except because the new text in placed at the current insertion point.

提交回复
热议问题