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

Retrieving multiple selections


For a quick and ready-to-use way to pop up and retrieve multiple selections from a user, MultiChoiceDialog can be used to provide a simple and quick way for users to select multiple items by enabling checkboxes next to items in a list. The use of checkboxes provides a simple way for users to make selections without having to perform multiselections using the Shift or Ctrl keys when clicking on items in the list. So, in this recipe, we will use MultiChoiceDialog to request the user to provide a list of the bitmap resources that they would like to see displayed in the application.

How to do it…

Here are the steps that you need to perform:

  1. First, let's make a simple panel that we will use to display the chosen bitmaps with, as follows:

    class BitmapPanel(wx.Panel):
        def __init__(self, parent):
            super(BitmapPanel, self).__init__(parent)
    
            sizer = wx.WrapSizer(wx.HORIZONTAL)
            self.Sizer = sizer
    
        def AddBitmap(self, artID):
            bmp = wx...
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