Resizes the widget.

        :param int width:
            The width of the widget.

        :param int height:
            The height of the widget.

def resize(self, width, height):
        """
        Resizes the widget.

        :param int width:
            The width of the widget.

        :param int height:
            The height of the widget.
        """
        self._width = width
        self._height = height

        # update radio buttons width
        for item in self._rbuttons:
            item.width = width

        # update radio buttons height
        if len(self._rbuttons) > 0:
            # work out the height of a button
            button_height = height
            
            if isinstance(height, int):
                if height % len(self._rbuttons) != 0:
                    # if the height doesnt divide by the number of radio buttons give a warning
                    button_height = int(round(height / len(self._rbuttons)))
                    new_height = button_height * len(self._rbuttons)
                    utils.error_format("ButtonGroup height '{}' doesn't divide by the number of buttons '{}' setting height to '{}'.".format(height, len(self._rbuttons), new_height))
                else:
                    button_height = int(height / len(self._rbuttons))
            
            for item in self._rbuttons:
                item.height = button_height

        super(ButtonGroup, self).resize(width, height)