def alignRow(self, block, widthShortfall):

        canGrowCount = 0
        for widget in block.widgetList:
            if widget.canGrowHorizontal():
                canGrowCount += 1
        if canGrowCount > 0:
            growBy = widthShortfall / canGrowCount
            if growBy > 0:
                for widget in block.widgetList:
                    if widget.canGrowHorizontal():
                        widget.growHorizontal(growBy)
                        widthShortfall -= growBy
        # Add any unallocated space as margins between the widgets
        if widthShortfall > 0:
            marginGrow = widthShortfall / len(block.widgetList)
            if marginGrow > 0:
                for widget in block.widgetList:
                    widget.addToHorizontalMargin(marginGrow)
                    widthShortfall -= marginGrow
        if widthShortfall > 0:
            for widget in block.widgetList:
                widget.addToHorizontalMargin(1)
                widthShortfall -= 1
                if widthShortfall == 0:
                    break
        # Now sort out any vertical shortfall
        for widget in block.widgetList:
            widgetHeight = block.startPosn[0] + widget.getMatrixSize()[0]
            heightShortfall = block.growToHeight - widgetHeight
            if heightShortfall > 0:
                if widget.canGrowVertical():
                    widget.growVertical(heightShortfall)
                else:
                    widget.addToVerticalMargin(heightShortfall)

    # -------------------------------------------------------------------------
Method to align the widgets laid out in a single row.
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/survey_LayoutBlocks.alignRow