How can I display the second button in my kv file [Python and vs code]

Viewed 22

I have looked up the following articles regarding buttons not showing up on kivy files. Article 1 (Kivy button doesn't show) and Article 2 (Kivy Button not displaying)

How can I get this second button to display?

I was following a YouTube tutorial (https://youtu.be/AU8jjgzH1LE?t=139) and when I went to run the code, only the first button "hello world" was available to see and click.

main.py file code

import kivy

from kivy.app import App
from kivy.lang import Builder

GUI = Builder.load_file('main.kv')

class MainApp(App):
    def build(self):
        return GUI

MainApp().run()

My main.kv file code

GridLayout:
    cols: 1
    Button:
        text: "hello world"
    Button:
        text: "click me"
        on_release:
            print('HI')

main.kv file code

virtual environment

0 Answers
Related