| |
| |
Preface | |
| |
| |
Acknowledgments | |
| |
| |
About this book | |
| |
| |
| |
Introduction to wxPython | |
| |
| |
| |
Welcome to wxPython | |
| |
| |
| |
Getting started with wxPython | |
| |
| |
| |
Creating the bare-minimum wxPython program | |
| |
| |
| |
Extending the bare-minimum wxPython program | |
| |
| |
| |
Creating the final hello.py program | |
| |
| |
| |
What can wxPython do? | |
| |
| |
| |
Why choose wxPython? | |
| |
| |
| |
How wxPython works | |
| |
| |
| |
Summary | |
| |
| |
| |
Giving your wxPython program a solid foundation | |
| |
| |
| |
What do I need to know about the required objects? | |
| |
| |
| |
How do I create and use an application object? | |
| |
| |
| |
How do I direct output from a wxPython program? | |
| |
| |
| |
How do I shut down my wxPython application? | |
| |
| |
| |
How do I create and use the top-level window object? | |
| |
| |
| |
How do I add objects and subwindows to a frame? | |
| |
| |
| |
How can I use common dialogs? | |
| |
| |
| |
What are some common errors with application objects and frames? | |
| |
| |
| |
Summary | |
| |
| |
| |
Working in an event-driven environment | |
| |
| |
| |
What terminology do I need to understand events? | |
| |
| |
| |
What is event-driven programming? | |
| |
| |
| |
How do I bind an event to a handler? | |
| |
| |
| |
How are events processed by wxPython? | |
| |
| |
| |
What other event properties are contained in the application object? | |
| |
| |
| |
How can I create my own events? | |
| |
| |
| |
Summary | |
| |
| |
| |
Making wxPython easier to handle with PyCrust | |
| |
| |
| |
How do I interact with a wxPython program? | |
| |
| |
| |
What are the useful features of PyCrust? | |
| |
| |
| |
What do the PyCrust notebook tabs do? | |
| |
| |
| |
How can I wrap PyCrust around my wxPython application? | |
| |
| |
| |
What else is in the Py package? | |
| |
| |
| |
How can I use modules from the Py package in my wxPython programs? | |
| |
| |
| |
Summary | |
| |
| |
| |
Creating your blueprint | |
| |
| |
| |
How can refactoring help me improve my code? | |
| |
| |
| |
How do I keep the Model and View separate in my program? | |
| |
| |
| |
How do you unit-test a GUI program? | |
| |
| |
| |
Summary | |
| |
| |
| |
Working with the basic building blocks | |
| |
| |
| |
Drawing to the screen | |
| |
| |
| |
Adding window decorations | |
| |
| |
| |
Getting standard information | |
| |
| |
| |
Making the application look nice | |
| |
| |
| |
Summary | |
| |
| |
| |
Essential wxPython | |
| |
| |
| |
Working with the basic controls | |
| |
| |
| |
Displaying text | |
| |
| |
| |
Working with buttons | |
| |
| |
| |
Entering and displaying numbers | |
| |
| |
| |
Giving the user choices | |
| |
| |
| |
Summary | |
| |
| |
| |
Putting widgets in frames | |
| |
| |
| |
The life of a frame | |
| |
| |
| |
Using frames | |
| |
| |
| |
Alternative frame types | |
| |
| |
| |
Using splitter windows | |
| |
| |
| |
Summary | |
| |
| |
| |
Giving users choices with dialogs | |
| |
| |
| |
Working with modal dialogs | |
| |
| |
| |
Using standard dialogs | |
| |
| |
| |
Creating a wizard | |
| |
| |
| |
Showing startup tips | |
| |
| |
| |
Using validators to manage data in a dialog | |
| |
| |
| |
Summary | |
| |
| |
| |
Creating and using wxPython menus | |
| |
| |
| |
Creating Menus | |
| |
| |
| |
Working with menu items | |
| |
| |
| |
Sprucing up your menus | |
| |
| |
| |
Usability guidelines for menus | |
| |
| |
| |
Summary | |
| |
| |
| |
Placing widgets with sizers | |
| |
| |
| |
What's sizer? | |
| |
| |
| |
Basic sizers with the grid sizer | |
| |
| |
| |
Using the other sizer types | |
| |
| |
| |
Can I see a real-world example of sizers in action? | |
| |
| |
| |
Summary | |
| |
| |
| |
Manipulating basic graphical images | |
| |
| |
| |
Working with images | |
| |
| |
| |
Dealing with device contexts | |
| |
| |
| |
Graphics manipulation | |
| |
| |
| |
Summary | |
| |
| |
| |
Advanced wxPython | |
| |
| |
| |
Building list controls and managing items | |
| |
| |
| |
Building a list control | |
| |
| |
| |
Managing items in a list | |
| |
| |
| |
Responding to users | |
| |
| |
| |
Editing and sorting list controls | |
| |
| |
| |
Creating a virtual list control | |
| |
| |
| |
Summary | |
| |
| |
| |
Coordinating the grid control | |
| |
| |
| |
Creating your grid | |
| |
| |
| |
Working with your grid | |
| |
| |
| |
Custom renderers and editors | |
| |
| |
| |
Capturing user events | |
| |
| |
| |
Summary | |
| |
| |
| |
Climbing the tree control | |
| |
| |
| |
Creating tree controls and adding items | |
| |
| |
| |
What styles control the display of the tree control? | |
| |
| |
| |
Sorting elements of a tree control | |
| |
| |
| |
Controlling the image for each item | |
| |
| |
| |
Navigating the tree programmatically | |
| |
| |
| |
Managing the tree selection | |
| |
| |
| |
Controlling which items are visible | |
| |
| |
| |
Making a tree control user editable | |
| |
| |
| |
Responding to other user events from a tree control | |
| |
| |
| |
Using a tree list control | |
| |
| |
| |
Summary | |
| |
| |
| |
Incorporating HTML into your application | |
| |
| |
| |
Displaying HTML | |
| |
| |
| |
Manipulating the HTML window | |
| |
| |
| |
Extending the HTML window | |
| |
| |
| |
Summary | |
| |
| |
| |
The wxPython printing framework | |
| |
| |
| |
How do I print in wxPython? | |
| |
| |
| |
How do I display the print dialog? | |
| |
| |
| |
How do I display the page setup dialog? | |
| |
| |
| |
How do I print something? | |
| |
| |
| |
How can I perform a print preview? | |
| |
| |
| |
Summary | |
| |
| |
| |
Using other wxPython functionality | |
| |
| |
| |
Putting objects on the clipboard | |
| |
| |
| |
Being the source of a drag and drop | |
| |
| |
| |
Being the target of a drag and drop | |
| |
| |
| |
Transferring custom objects | |
| |
| |
| |
Setting timed events using wx.Timer | |
| |
| |
| |
Creating a multithreaded wxPython application | |
| |
| |
| |
Summary | |
| |
| |
Index | |