开发者

YUI shrink panel around content?

开发者 https://www.devze.com 2023-01-07 09:07 出处:网络
I have a YUI resizable dialog that contains a multi-tab widget. Works fine on 开发者_JAVA技巧IE > 7, Safari, FF, Chrome.

I have a YUI resizable dialog that contains a multi-tab widget. Works fine on 开发者_JAVA技巧IE > 7, Safari, FF, Chrome.

Question: Initially, when a user changes tabs, the dialog shrinks to fit the new tab.

But after the user resizes the dialog, if a new tab is selected, the dialog does NOT shrink to fit the new tab.

How can I change the size of the dialog so it is again wrapped around a tab when a tab is selected by the user?

Test case html


After resizing the Dialog, a width is set on the Dialog's DIV. This width dictates it's size, and not the content (it's one or the other). You'll need to set the width of the DIV which the resize instance is sizing to "", to have it shrink-wrap it's content again. You may need to re-sync resize afterwards, so it knows about the new content driven size.

Hope that helps, Satyen

0

精彩评论

暂无评论...
验证码 换一张
取 消