I am creating an XUI dialog box in which I show or hide text box based on whether a check box is selected. I start with the withdraw attribute of the text box set to true. When the checkbox is clicked, I check to see if the value of the check attribute of the checkbox is true (the checkbox is checked). If it is true, I change the withdraw attribute of the textbox to false, which makes the textbox appear. If the value of the check attribute of the checkbox is false (the checkbox is checked), I change the withdraw attribute of the textbox to true, hiding the textbox.
This works fine, the textbox appears and disappears as it should. The problem I'm having is that the dialog resizes to accomodate the text box when it appears, but then when the textbox is hidden again, the space where the textbox was remains instead of the dialog box getting resized to the original size it was before the textbox appeared.
Does anyone know how I can make the dialog box resize back to the smaller size when the textbox is removed?