PacktLib: wxPython 2.8 Application Development Cookbook

wxPython 2.8 Application Development Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Getting Started with wxPython

Introduction

The application object

The main frame

Understanding the window hierarchy

Referencing controls

Using Bitmaps

Adding icons to Windows

Utilizing Stock IDs

Accessing the clipboard

Supporting drag and drop

Two-stage widget creation

Understanding inheritance limitations

Responding to Events

Introduction

Handling events

Understanding event propagation

Handling Key events

Using UpdateUI events

Playing with the mouse

Creating custom event classes

Managing event handlers with EventStack

Validating input with validators

Handling Apple events

Basic Building Blocks of a User Interface

Introduction

Creating Stock Buttons

Buttons, buttons, and more buttons

Offering options with CheckBoxes

Using the TextCtrl

Providing choices with the Choice control

Adding Menus and MenuBars

Working with ToolBars

How to use PopupMenus

Grouping controls with a StaticBox

Advanced Building Blocks of a User Interface

Introduction

Listing data with a ListCtrl

Browsing files with the CustomTreeCtrl

Creating a VListBox

StyledTextCtrl using lexers

Working with tray icons

Adding tabs to a Notebook

Using the FlatNotebook

Scrolling with a ScrolledPanel

Simplifying the FoldPanelBar

Providing Information and Alerting Users

Introduction

Showing a MessageBox

Providing help with ToolTips

Using SuperToolTips

Displaying a BalloonTip

Creating a custom SplashScreen

Showing task progress with the Progress dialog

Creating an AboutBox

Retrieving Information from Users

Introduction

Selecting files with a FileDialog

Searching text with a FindReplaceDialog

Getting images with ImageDialog

Using the Print dialogs

Window Layout and Design

Introduction

Using a BoxSizer

Understanding proportions, flags, and borders

Laying out controls with the GridBagSizer

Standard dialog button layout

Using XML resources

Making a custom resource handler

Using the AuiFrameManager

Drawing to the Screen

Introduction

Screen drawing

Drawing shapes

Utilizing SystemSettings

Using a GraphicsContext

Drawing with RendererNative

Reducing flicker in drawing routines

Design Approaches and Techniques

Introduction

Creating Singletons

Implementing an observer pattern

Strategy pattern

Model View Controller

Using mixin classes

Using decorators

Creating Components and Extending Functionality

Introduction

Customizing the ArtProvider

Adding controls to a StatusBar

Making a tool window

Creating a SearchBar

Working with ListCtrl mixins

StyledTextCtrl custom highlighting

Creating a custom control

Using Threads and Timers to Create Responsive Interfaces

Introduction

Non-Blocking GUI

Understanding thread safety

Threading tools

Using Timers

Capturing output

Building and Managing Applications for Distribution

Introduction

Working with StandardPaths

Persisting the state of the UI

Using the SingleInstanceChecker

Exception handling

Optimizing for OS X

Supporting internationalization

Distributing an application

Index