Kivy Course #4 – Box Layout Example

This part is continuing with BoxLayout class of Kivy. BoxLayout is another common layout which is used frequently. It supports both vertical and horizontal orientations and size hints to spare the widgets at specific ratios. The Python code is: from import App from kivy.uix.boxlayout import BoxLayout class RootWidget(BoxLayout): pass class kutuApp(App): def build(self): return RootWidget() if __name__ == "__main__": kutuApp().run() And the Kivy Language file is: <RootWidget>: orientation: "vertical" BoxLayout: size_hint_y: 0.

Python Kivy Slider, Color and Canvas Example

Working with kivy often requires writing canvas codes which are managing the appearance  before, during and after the content is drawn. In this example, one Kivy Slider is used for getting color value between 0 and 1 and in the same time there is a Kivy Label which contains Slider’s value and updated automatically with the help of automatic property binding on Kivy.

Python Kivy Button, Property and BoxLayout Example

In this post, you are able to find an example of Kivy Framework consists of a button and two text label in a boxlayout oriented vertically. There are two files and both are required to run this program. This program is suitable for both mobile and desktop versions of Kivy and has ability to resume at gaining focus when screen is locked or for another reason the program is put in background.