cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

resizing XUi dialog boxes

carolynherlin
1-Newbie

resizing XUi dialog boxes

Hi Adepters,

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?

Thanks,
Carolyn Herlin
2 REPLIES 2

Carolyn,

The dialog (the <window> element, technically) probably has the "resize"
attribute set to "natural", which is the default. This allows the
window to grow to accommodate its children. Personally, I'd have my
code adjust the size of the window, rather than relying on the window to
resize itself. You should be able to examine the "height" and/or
"width" attributes of the window element and increment one or both, as
needed, by the size of the textbox plus some fixed padding. I'd
increase the size of the window just before showing the text box and
shrink it back just after hiding it.

-Brandon 🙂




Thanks Brandon. I'll give that a try.
Announcements