'Recursive method to ensure all widgets line up
@todo: parameter description'

def realign(self, formWidth):

    rowList = {}
    for block in self.contains:
        startRow = block.startPosn[0]
        endRow = block.endPosn[0]
        if (startRow in rowList):
            rowList[startRow].add(block)
            continue
        else:
            overlap = False
            for storedBlock in rowList.values():
                if (((startRow < storedBlock.startRow) and (endRow >= storedBlock.startRow)) or ((startRow < storedBlock.maxHeight) and (endRow >= storedBlock.maxHeight)) or ((startRow > storedBlock.startRow) and (endRow <= storedBlock.maxHeight))):
                    storedBlock.add(block)
                    overlap = True
                    break
            if overlap:
                continue
        rowList[startRow] = self.RowBlocks(block)
    for row in rowList.values():
        if (row.cnt == 1):
            row.blocks[0].growTo(formWidth)
        else:
            widthShortfall = (formWidth - row.maxWidth)
            widthShortfallPart = (widthShortfall / row.cnt)
            colAdjust = 0
            for block in row.blocks:
                if (widthShortfall > 0):
                    widthShortfall -= widthShortfallPart
                    block.slideHorizontally(colAdjust)
                    block.growBy(widthShortfallPart)
                    colAdjust += widthShortfallPart
                if (block.endPosn[0] < row.maxHeight):
                    block.growTo(height=row.maxHeight)
            colAdjust = 0
            for block in row.blocks:
                if (widthShortfall == 0):
                    break
                block.growBy()
                widthShortfall -= 1
                block.slideHorizontally(colAdjust)
                colAdjust += 1
            rowCnt = len(row.blocks)
            if (rowCnt > 1):
                rowCntList = {}
                for block in row.blocks:
                    rowCntList[block.startPosn[0]] = True
                if (len(rowCntList) == 1):
                    formWidth = self.growToWidth
    blkCnt = len(self.contains)
    for block in self.contains:
        if (block.widgetList == []):
            block.realign(self.growToWidth)
        else:
            self.alignBlock(block, blkCnt)
