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.
Our main 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()
Name this as uygulama.kv:
<RootWidget>: orientation: "vertical" Button: text: "Selam" font_size: "50sp" Button: text: "asdı" Button: text: "Üçüncü buton"
comments powered by Disqus