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

Using the basics: buttons, labels, and text inputs

Here, we will work with basic widgets as the first approach to the chapter topic. In our task, we will develop an app that has three elements: a text input, a button, and a label. Using this, the user can modify the label by pressing the button, by moving the cursor into the text input, or by changing the text input.

Getting ready

In the following few recipes, we are going to intensively use Kv language, so it is important for you to read Chapter 1, Kivy and the Kv language or at least the recipe Accessing widgets defined inside Kv language in your Python code from the first chapter.

How to do it…

To complete the task, follow these steps:

  1. In the KV file, define a label.
  2. Also define the button with an ...
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