O'Reilly logo

Kivy – Interactive Applications and Games in Python - Second Edition by Roberto Ulloa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Kivy and its properties

Even though we have only touched upon explanations of properties in the previous section, the truth is that we have been using them since the beginning of this chapter. Kivy's internals are full of properties. They are almost everywhere. For example, when we implemented DraggableWidget, we simply modified the center_x property (line 72 and 73), and the whole Widget was then kept updated because there is a chain of properties involved in the use of center_x.

The last example in this chapter illustrates how powerful Kivy properties are. Here is the code for statusbar.py:

273. # File name: statusbar.py 274. from kivy.uix.boxlayout import BoxLayout 275. from kivy.properties import NumericProperty, ObjectProperty 276. 277. class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required