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

Creating layouts

Layout widgets are useful to organize the widgets in our app, but we can get more benefits from them if we include some graphics in them. In this recipe, we will add a background to a layout.

Getting ready

We are going to work with layouts in this recipe, so you should have cleared the concepts behind them. It is recommended that you read the recipe Organizing with layouts in Chapter 4, Widgets. We will also use the three images from the first recipe of this chapter.

How to do it…

In this recipe, we are going to use a KV file to define our new layout and basic Python to execute our app. To complete the recipe, perform the following steps:

  1. In the KV file, define a widget named CustomLayout.
  2. Give a yellow rectangle layout to the canvas. ...
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