O'Reilly logo

Kivy Cookbook by Hugo Solis

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

Declaring a property

This recipe will work with the last type of events, which is the property event. To be very specific, we will create an invisible widget that will fire an event when a selected property is changed. Just to identify of this invisible widget, we surround it with two normal buttons; thus, the section between them is our invisible widget.

Getting ready

The properties in Kivy have been reviewed in Chapter 1, Kivy and the Kv language, specifically with in the Declaring properties within a class recipe. Thus, it will be useful to refer to this recipe and also to the section on multitouching from Chapter 2, Input, Motion, and Touch.

How to do it…

The recipe is:

  1. First, import the ListProperty from Kivy properties.
  2. Create the class for the ...

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