def METHOD_NAME(self, panel, width, height, flex):
    # Increment should be large enough that the minimum window width can be determined
    # by either the buttons or the labels, depending on the labels' size.
    INCREMENT = 70
    setattr_if_changed(self.style_label.style, "width", width * INCREMENT)
    setattr_if_changed(self.style_label.style, "height", height * INCREMENT)
    setattr_if_changed(self.style_label.style, "flex", flex)