<Menu>:
Label:
text: "Hello World"
The kv code in the <> needs to match the name of the python class definition.
As an aside, there is no reason in this case to put a label inside a Widget, a Label is derived frow a Widget. Put widgets in Layouts. The layouts position and size their child widgets.
--
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/d041f6e9-3af4-4c05-8912-fc4d5a297843n%40googlegroups.com.
Try this:
from kivy.app import App
from kivy.uix.label import Label
class Menu(Label):
pass
class MyApp(App):
def build(self):
return Menu()
if __name__ == "__main__":
MyApp().run()
my.kv:
<Menu>
text: "Hello World"To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/7ada8272-c13d-446a-bc93-a9a89137e23bn%40googlegroups.com.
Do you have only one kv file in the directory? The code I posted runs for me.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/a008e3e8-4538-4cbf-ad9c-5d277fcd1536n%40googlegroups.com.