www.it-ebooks.info
www.it-ebooks.info
Dusty Phillips
Creating Apps in Kivy
www.it-ebooks.info
Creating Apps in Kivy
by Dusty Phillips
Copyright © 2014 Dusty Phillips. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or [email protected].
Editors: Meghan Blanchette and Rachel Roumeliotis
Production Editor: Nicole Shelby
Copyeditor: Rachel Monaghan
Proofreader: Rachel Head
Indexer: Judy McConville
Cover Designer: Randy Comer
Interior Designer: David Futato
Illustrator: Rebecca Demarest
April 2014: First Edition
Revision History for the First Edition:
2014-04-08: First release
See http://oreilly.com/catalog/errata.csp?isbn=9781491946671 for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc. Creating Apps in Kivy, the image of a kiang, and related trade dress are trademarks of O’Reilly
Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark
claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume no
responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-491-94667-1
[LSI]
www.it-ebooks.info
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1. Introducing Kivy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Dependencies: The Hard Part 2
Installing on Mac OS 3
Installing on Windows 4
Writing Code: The Easy Part 5
Introducing the KV Language 6
User Interface Design 7
Widgets 9
The KV Language Root Widget 10
Creating a Custom Widget 12
Adjusting Widget Size 13
File It All Away 18
2. Events and Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
What Is an Event? 21
Adding Logic to a Custom Widget 22
Responding to Events 23
Accessing Properties of KV Language Widgets 24
Populating the Search Result List 27
File It All Away 32
3. Manipulating Widgets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A More Extensible Root Widget 35
ListView Adapters 36
Responding to ListView Item Events 39
Swappable Widgets 41
Switching Forms 43
iii
www.it-ebooks.info
1 / 139 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !