def __init__(self):
        """
        The constructor.

        Creates a wx.PySizer. Must be called from the __init__ in the
        derived class.
        """
        theClass = "PySizer"

        wx.RegisterFirstCallerClassName(self, theClass)

        Sizer.__init__(self)

        try:
            self.theFirstCallerName != theClass
        except AttributeError:
            self.theFirstCallerName = theClass

        self.tsBeginClassRegistration(theClass, wx.ID_ANY)

        ##        self.ts_Children = wxSizerItemList()
        ##        self.ts_ContainingWindow = None
        ##        self.ts_MinSize = None
        ##        self.ts_Position = None
        ##        self.ts_Size = None

        self.tsEndClassRegistration(theClass)
    def __init__(self, vgap=0, hgap=0):
        """
        Constructor, with optional parameters to specify the gap between
        the rows and columns.
        """
        theClass = "GridBagSizer"

        wx.RegisterFirstCallerClassName(self, theClass)

        Sizer.__init__(self)

        self.tsBeginClassRegistration(theClass, id)

        self.ts_vgap = vgap
        self.ts_hgap = hgap

        self.tsEndClassRegistration(theClass)
    def __init__(self, *args, **kwargs):
        '''
        Constructor for a wx.GridSizer. rows and cols determine the number of
        columns and rows in the sizer - if either of the parameters is zero,
        it will be calculated to from the total number of children in the
        sizer, thus making the sizer grow dynamically. vgap and hgap define
        extra space between all children.
        '''
        theClass = 'GridSizer'

        wx.RegisterFirstCallerClassName(self, theClass)

        Sizer.__init__(self)

        try:
            self.theFirstCallerName != theClass
        except AttributeError:
            self.theFirstCallerName = theClass

        self.tsBeginClassRegistration(theClass, wx.ID_ANY)

        if ((len(args) == 0) and \
            (len(kwargs) == 0)):

            # Instatiate Grid Class without using args or kwargs
            # associated with instantiation variants.

            rows = 0
            cols = 0
            vgap = 0
            hgap = 0

        elif ((len(args) + len(kwargs)) == 2):

            # Instatiate Grid Class without using args or kwargs
            # associated with instantiation variants.

            if ((isinstance(args[0], int)) and \
                (isinstance(args[1], wxSize))):

                # def __init__(self, cols, gap):
                cols = args[0]
                vgap = args[1].height
                hgap = args[1].width

            else:

                # def __init__(self, Cols=0, Gap=wx.DefaultSize):
                cols = kwargs['Col']
                vgap = kwargs['Gap'].height
                hgap = kwargs['Gap'].width

            if cols == 0:
                rows = 1
            else:
                rows = 0

            self.logger.wxASSERT(cols >= 0)

        elif ((len(args) + len(kwargs)) == 3):

            # Instatiate Grid Class without using args or kwargs
            # associated with instantiation variants.

            if ((isinstance(args[0], int)) and \
                (isinstance(args[1], int)) and \
                (isinstance(args[2], int))):

                # def __init__(self, cols, vgap, hgap):
                cols = args[0]
                vgap = args[1]
                hgap = args[2]

                if cols == 0:
                    rows = 1
                else:
                    rows = 0

            elif ((isinstance(args[0], int)) and \
                  (isinstance(args[1], int)) and \
                  (isinstance(args[2], wxSize))):

                # def __init__(self, rows, cols, gap):
                rows = args[0]
                cols = args[1]
                vgap = args[2].height
                hgap = args[2].width

            else:

                # def __init__(self, rows=0, cols=0, gap=wx.DefaultSize):
                rows = kwargs['Rows']
                cols = kwargs['Cols']
                vgap = kwargs['Gap'].height
                hgap = kwargs['Gap'].width

            self.logger.wxASSERT(cols >= 0)

        else:

            # if ((len(args) + len(kwargs)) == 4):

            if (len(args) == 4):

                # Instatiate Grid Class without using args or kwargs
                # associated with instantiation variants.

                # def __init__(self, rows, cols, vgap, hgap):
                rows = args[0]
                cols = args[1]
                vgap = args[2]
                hgap = args[3]

            else:

                # Instatiate Grid Class without using args or kwargs
                # associated with instantiation variants.

                # def __init__(self, rows=1, cols=0, vgap=0, hgap=0):
                rows = kwargs['Rows']
                cols = kwargs['Cols']
                vgap = kwargs['Vgap']
                hgap = kwargs['Hgap']

 
            if ((rows == 0) and \
                (cols == 0)):

                rows = 1

            self.logger.wxASSERT((rows >= 0) and (cols >= 0))

        if ((rows | cols) == 0):
            self.ts_Rows = 1
        else:
            self.ts_Rows = rows

        self.ts_Cols = cols

        self.ts_HGap = hgap

        self.ts_VGap = vgap

##        self.ts_ContainingWindowClientArea = DEFAULT_SIZE

        self.tsEndClassRegistration(theClass)