Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
wxPython Application Development Cookbook

You're reading from   wxPython Application Development Cookbook Over 80 step-by-step recipes to get you up to speed with building your own wxPython applications

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785287732
Length 264 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Cody Precord Cody Precord
Author Profile Icon Cody Precord
Cody Precord
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. wxPython Starting Points FREE CHAPTER 2. Common User Controls 3. UI Layout and Organization 4. Containers and Advanced Controls 5. Data Displays and Grids 6. Ways to Notify and Alert 7. Requesting and Retrieving Information 8. User Interface Primitives 9. Creating and Customizing Components 10. Getting Your Application Ready for Release Index

Making your own dialog


Even though wxPython provides a large number of dialog options that can be used for most standard actions that any general application may need to perform, there will almost certainly come a time when you need to make your own custom dialog. There are many actions that can be better customized for a given application through their own dialogs. For example, wxPython provides PasswordEntryDialog, but this dialog only has one field for a password; if your application requires a login dialog, this likely won't meet your needs. So, in this recipe, we will take a look at how to create custom dialogs by making a user login dialog.

How to do it…

For this recipe, perform the following steps:

  1. First, let's begin by defining the dialog subclass and its major parts using the following code:

    class LoginDialog(wx.Dialog):
        def __init__(self, parent, title="Login"):
            super(LoginDialog, self).__init__(parent, title=title)
    
            self._user = wx.TextCtrl(self)
            self._pass...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image