Field noteTR1 min read

Kivy Course #2 – More Buttons With Kivy Language

Arşiv notu: Bu yazı özgün haliyle korunmuştur. Sürümler, bağlantılar veya komutlar güncelliğini yitirmiş olabilir.

At the second part of the course, more buttons are added to root widget and Kivy Language is utilized while adding them. From this part, view section of the codes are seperated in a .kv file. You can find the codes below.

Python file

from kivy.app import App

from kivy.uix.boxlayout import BoxLayout

class RootWidget(BoxLayout):
    pass

class uygulamaApp(App):
    def build(self):
        return RootWidget()


if __name__ == "__main__":
    uygulamaApp().run()

Kivy file (uygulama.kv)

<RootWidget>:
    orientation: "vertical"
    Button:
        text: "Selam"
        font_size: "50sp"
    Button:
        text: "asdı"
    Button:
        text: "Üçüncü buton"