Assume the following files:
CustomWidget.py
CustomWidget.kv
main.py – main app file that uses the CustomWidget
Inside CustomWidget.py
Builder.load_file(‘CustomWidget.kv’) # you can name the file whatever you want
Inside main.py
import CustomWidget
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/62173388-bcc9-49c5-84ff-bd13a3ca2049o%40googlegroups.com.
Assume the following files:
CustomWidget.py
CustomWidget.kv
main.py – main app file that uses the CustomWidget
Inside CustomWidget.py
Builder.load_file(‘CustomWidget.kv’) # you can name the file whatever you want
Inside main.py
import CustomWidget
From: Degenerate Tech
Sent: Friday, August 28, 2020 7:18 AM
To: Kivy users support
Subject: [kivy-users] Re: how to do modules with kivy language...
i have uploded mymodule.py in pure python which i know ...but i wnt to know with kivy file
On Friday, August 28, 2020 at 7:45:40 PM UTC+5:30, Degenerate Tech wrote:i want to use mymodule.py file in another kivy app.. In pure python i did..but python and kivy language how to do that?
######mymodule.py###########
from kivy.app import App
from kivy.uix.boxlayout import*
class MyWidget(BoxLayout):pass
######but what will be kv file name ? how to define ?
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.