Table Of Contents

Previous topic

RowDragWindow

Next topic

PyFlexGridSizer

This Page

phoenix_title grids

In this module you will find PyGridSizer and PyFlexGridSizer. Please note that these sizers have since been ported to C++ (as wx.GridSizer and wx.FlexGridSizer) and those versions are now exposed in the regular wxPython wrappers. However I am also leaving them here in the library so they can serve as an example of how to implement sizers in Python.

PyGridSizer: Sizes and positions items such that all rows are the same height and all columns are the same width. You can specify a gap in pixels to be used between the rows and/or the columns. When you create the sizer you specify the number of rows or the number of columns and then as you add items it figures out the other dimension automatically. Like other sizers, items can be set to fill their available space, or to be aligned on a side, in a corner, or in the center of the space. When the sizer is resized, all the items are resized the same amount so all rows and all columns remain the same size.

PyFlexGridSizer: Derives from PyGridSizer and adds the ability for particular rows and/or columns to be marked as growable. This means that when the sizer changes size, the growable rows and colums are the ones that stretch. The others remain at their initial size.


class_hierarchy Inheritance Diagram

Inheritance diagram for module grids

Inheritance diagram of grids


class_summary Classes Summary

PyFlexGridSizer  
PyGridSizer