Pythoncard Textarea كيفية تعيين النص
-
19-09-2019 - |
سؤال
لقد قمت بإنشاء Textarea في مشروع Python الخاص بي باستخدام PythonCard
المشكلة هي أنه لا أعرف كيفية الاتصال به في مشروعي لتغيير النص. يطلق عليه mytextarea.
شكرًا
المحلول
شاهد Doc Textarea هنا: http://pythoncard.sourceforge.net/framework/components/textarea.html.
أعتقد أن الأساليب التي تريد استخدامها هي Appendtext و WRITETEXT
نصائح أخرى
من داخل فئة واجهة المستخدم الرسومية التي تم إنشاؤها بيثونكارد:
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
لا تنتمي إلى StackOverflow