Python Kivy tutorials-Basic widgets – labels and buttons

Learn about Widgets, labels and buttons in Kivy language

In the previous chapter, we used the Label class, which is one of the multiple widgets that Kivy provides. You can think of widgets as interface blocks that we use to set up a GUI. Python Kivy has a complete set of widgets – buttons, labels, checkboxes, dropdowns, and many more. You can find them all in the API of Kivy under the package kivy.

We are going to learn the basics of how to create our own personalized widget without affecting the default configuration of Kivy widgets. In order to do that, we will use inheritance to create the widget class in the file:

from import App
class widgets(App):
if __name__ == '__main__':

widgets.kv file:

          text: "Hello"
          text: "Beautiful"
          text: "World"

In this way we can play a lot with widgets, labels and buttons in Kivy. We will continue more in the next chapter.

Create your first kivy app

Default image
Aman Kharwal

I am a programmer from India, and I am here to guide you with Data Science, Machine Learning, Python, and C++ for free. I hope you will learn a lot in your journey towards Coding, Machine Learning and Artificial Intelligence with me.

Leave a Reply