开发者

Pythoncard textarea how to set text

开发者 https://www.devze.com 2022-12-15 14:47 出处:网络
I hav开发者_运维问答e created a textarea in my python project using Pythoncard The problem is, I don\'t know how to call it in my project to change the text. It\'s called myTextArea.

I hav开发者_运维问答e created a textarea in my python project using Pythoncard

The problem is, I don't know how to call it in my project to change the text. It's called myTextArea.

Thanks


see the TextArea doc here: http://pythoncard.sourceforge.net/framework/components/TextArea.html

I think the methods you want to use are appendText and writeText


From within the PythonCard-generated GUI class:

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
0

精彩评论

暂无评论...
验证码 换一张
取 消