我已经在使用PythoncardPythoncard textarea的如何设置文本
问题是我的Python项目创建一个文本,我不知道如何调用它在我的项目更改文本。它被称为myTextArea。
感谢
我已经在使用PythoncardPythoncard textarea的如何设置文本
问题是我的Python项目创建一个文本,我不知道如何调用它在我的项目更改文本。它被称为myTextArea。
感谢
请参阅TextArea文档浏览:http://pythoncard.sourceforge.net/framework/components/TextArea.html
我想你要使用的方法是AppendText通过和WRITETEXT
从PythonCard生成的GUI类中:
self.components.myTextArea.clear() ## clear the TextArea
self.components.myTextArea.text = "initial text" ## directly set text
self.components.myTextArea.appendText("\nhello world") ## append text
self.components.myTextArea.writeText("\nhello world2") ## append text