© Mike Driscoll 2018
Mike DriscollwxPython Recipeshttps://doi.org/10.1007/978-1-4842-3237-8_15

15. Working with Sizers

Mike Driscoll
(1)
Ankeny, New York, USA
 

Recipe 15-1. How to Get Children Widgets from a Sizer

Problem

A459092_1_En_15_Fig1_HTML.jpg
Figure 15-1
Getting children widgets from a sizer
In this recipe we will discover how to get the children widgets from a sizer object. In wxPython, you would expect to call the sizer’s GetChildren() method. However, this returns a list of SizerItem objects rather than a list of the actual widgets themselves. You can see the difference if you call a wx.Panel’s GetChildren() method which will actually give you a list of widgets.

Solution ...

Get wxPython Recipes: A Problem - Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.