wxPython Application Development Cookbook
eBook - ePub

wxPython Application Development Cookbook

  1. 264 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

wxPython Application Development Cookbook

About this book

Over 80 step-by-step recipes to get you up to speed with building your own wxPython applications

About This Book

  • This book empowers you to create rich cross-platform graphical user interfaces using Python
  • It helps you develop applications that can be deployed on Windows, OSX, and Linux
  • The recipes in the book involve real-world applications, giving you a first-hand experience of the practical scenarios

Who This Book Is For

For those who are familiar with programming in Python and want to start building applications with graphical user interfaces, this book will get you up and running quickly. A basic understanding of the Python programming language and object-oriented concepts are all that is needed.

What You Will Learn

  • Create full featured user interfaces
  • Design and develop custom controls
  • Deploy and distribute wxPython applications to Windows, Macintosh OS X, Linux, and other UNIX-like environments
  • Handle and respond to application events
  • Manage and display data using grids
  • Interact with web services from your GUI
  • Use Paint events to draw custom displays
  • Support the display of user interfaces in multiple languages

In Detail

wxPython is a GUI toolkit for the Python programming language built on top of the cross-platform wxWidgets GUI libraries. wxPython provides a powerful set of tools that allow you to quickly and efficiently building applications that can run on a variety of different platforms. Since wxWidgets provides a wrapper around each platform's native GUI toolkit, the applications built with wxPython will have a native look and feel wherever they are deployed.

This book will provide you with the skills to build highly functional and native looking user interfaces for Python applications on multiple operating system environments. By working through the recipes, you will gain insights into and exposure to creating applications using wxPython. With a wide range of topics covered in the book, there are recipes to get the most basic of beginners started in GUI programming as well as tips to help experienced users get more out of their applications. The recipes will take you from the most basic application constructs all the way through to the deployment of complete applications.

Style and approach

This book is a collection of step-by-step recipes that introduce the various components and concepts of wxPython in a conversational and easy-to-follow way. Each recipe contains coded examples along with detailed explanations about the key points of each topic. Each topic is designed to introduce and show you how to use a single feature from the wxPython library.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

wxPython Application Development Cookbook


Table of Contents

wxPython Application Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. wxPython Starting Points
Introduction
Creating an application object
How to do it…
How it works…
There's more…
See also
Adding the main frame
How to do it…
How it works…
There's more…
Using bitmaps
How to do it…
How it works…
There's more…
Binding to events
How to do it…
How it works…
There's more…
See also
Understanding the hierarchy of the UI
How to do it…
How it works…
There's more…
See also
Controlling the propagation of events
How to do it…
How it works…
There's more…
Accessing the clipboard
How to do it…
How it works…
There's more…
See also
Supporting drag and drop
How to do it…
How it works…
There's more…
Handling AppleEvents
How to do it…
How it works…
There's more…
2. Common User Controls
Introduction
Starting with the easy button
How to do it…
How it works…
See also
Pushing all the buttons
How to do it…
How it works…
There's more…
Offering options with CheckBoxes
How to do it…
How it works…
Using TextCtrl
How to do it…
How it works…
There's more…
See also
Processing key events
How to do it…
How it works…
There's more…
Picking dates with DatePickerCtrl
How to do it…
How it works…
There's more…
Exploring menus and shortcuts
How to do it…
How it works…
There's more…
See also
Displaying a context menu
How to do it…
How it works…
See also
Working with ToolBars
Getting ready
How to do it…
How it works…
There's more…
See also
Managing UI states
Getting ready
How to do it…
How it works…
There's more…
3. UI Layout and Organization
Introduction
Laying out controls with Sizers
How to do it…
How it works…
See also
Controlling layout behavior
Getting ready
How to do it…
How it works…
There's more…
Grouping controls with a StaticBox control
How to do it…
How it works…
There's more…
Creating an automatic wrapping layout
How to do it…
How it works…
Using the standard dialog button sizer
How to do it…
How it works…
There's more…
Simplifying the panel layout
How to do it…
How it works…
There's more…
See also
Making dialog layout easy
Getting ready
How to do it…
How it works…
Building XML resource-based layouts
How to do it…
How it works…
There's more…
Extending XRC for custom controls
How to do it…
How it works…
There's more…
Advancing your UI with AuiManager
How to do it…
How it works…
There's more…
Additional AuiPaneInfo options
Saving and restoring a window's state
4. Containers and Advanced Controls
Introduction
Adding tabs with the Notebook control
How to do it…
How it works…
There's more…
See also
Enhancing ComboBox with bitmaps
How to do it…
How it works…
There's more…
See also
Configuring properties
How to do it…
How it works…
There's more…
Taking control with FlatNotebook
How to do it…
How it works…
There's more…
See also
Styling text in StyledTextCtrl
How to do it…
How it works…
There's more…
See also
Annotating StyledTextCtrl
Getting started
How to do it…
How it works…
There's more…
Displaying hierarchical data with TreeCtrl
How to do it…
How it works…
There's more…
Building a system tray application
Getting started
How to do it…
How it works…
There's more…
Surfing the Web in your app
How to do it…
How it works…
There's more…
5. Data Displays and Grids
Introduction
Displaying lists of data
How to do it…
How it works…
There's more…
See also
Editing data lists
Getting ready
How to do it…
How it works…
There's more…
Implementing a data source
How to do it…
How it works…
There's more…
See also
Getting started with the data grid
Getting ready
How to do it…
How it works…
There's more…
Custom Editors
Managing Attributes
See also
Displaying dynamic data
How to do it…
How it works…
There's more…
See also
Modeling your data
How to do it…
How it works…
There's more…
See also
Displaying your data model
Getting ready
How to do it…
How it works…
There's more…
6. Ways to Notify and Alert
Introduction
Showing MessageBox
How to do it…
How it works…
There's more…
Button flags
Icon flags
Using InfoBar
How to do it…
How it works…
There's more…
See also
Providing extra tips on usage
How to do it…
How it works…
Displaying transient notifications
How to do it…
How it works…
There's more…
See also
Making a splash at startup
How to do it…
How it works…
There's more…
See also
Giving busy feedback
How to do it…
How it works…
Showing information about your app
How to do it…
How it works…
There's more…
See also
7. Requesting and Retrieving Infor...

Table of contents

  1. wxPython Application Development Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access wxPython Application Development Cookbook by Cody Precord in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.