Skip to Content
Kivy Cookbook
book

Kivy Cookbook

by Hugo Solis
August 2015
Intermediate to advanced
246 pages
4h 21m
English
Packt Publishing
Content preview from Kivy Cookbook

Manipulating the widget tree

Now, we want to give more flexibility to our apps. There are situations when we have to add or remove widgets at the execution time, which results in a direct manipulation of the app's widget tree. In this recipe, we will develop an app that will add buttons with a click and will remove all widgets with a triple-click. We will use the double-click to remove a specific widget.

Getting ready

We will use the widget tree in this recipe, so it could be useful to review the recipe Referencing widgets in Chapter 1, Kivy and the Kv language. Also, we will be working with multitapping, so you either need to have your basics clear or refer to Detecting multitapping recipe from Chapter 2, Input, Motion, and Touch.

How to do it… ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Creating Apps in Kivy

Creating Apps in Kivy

Dusty Phillips
Kivy Blueprints

Kivy Blueprints

Mark Vasilkov

Publisher Resources

ISBN: 9781783987382Supplemental Content