'Method to align the widgets laid out different rows
@todo: parameter description'

def alignCol(self, block, heightShortfall, widthShortfall):

    for widget in block.widgetList:
        widgetWidth = (block.startPosn[1] + widget.getMatrixSize()[1])
        widthShortfall = (block.growToWidth - widgetWidth)
        if (widthShortfall == 0):
            continue
        if widget.canGrowHorizontal():
            widget.growHorizontal(widthShortfall)
        else:
            widget.addToHorizontalMargin(widthShortfall)
    if (heightShortfall == 0):
        return
    canGrowCount = 0
    for widget in block.widgetList:
        if widget.canGrowVertical():
            canGrowCount += 1
    if (canGrowCount > 0):
        growBy = (heightShortfall / canGrowCount)
        if (growBy > 0):
            for widget in block.widgetList:
                if widget.canGrowVertical():
                    widget.growVertical(growBy)
                    heightShortfall -= growBy
    if (heightShortfall > 0):
        marginGrow = (heightShortfall / len(block.widgetList))
        if (marginGrow > 0):
            for widget in block.widgetList:
                widget.addToVerticalMargin(marginGrow)
                heightShortfall -= marginGrow
    if (heightShortfall > 0):
        for widget in block.widgetList:
            widget.addToVerticalMargin(1)
            heightShortfall -= 1
            if (heightShortfall == 0):
                break
