PDA

View Full Version : YUI Panel + Tab Panel



hunkybill
13 Oct 2006, 5:39 AM
Hi,

I have a container for my panel, and inside that container, I have a container for a tab panel and some tabs. When I render() the panel, show() the panel (or render it visible), and then instantiate the tab panel, all is great.

What I really want however, is to mimic commentable... whereby I can click on an nice little icon and have my hidden panel show, with the tabs ready to go. The problem I am having, is the setup. If I rener the panel with with visible=false, instantiate the tabs, and the trigger an event that shows the panel, there is a ghost tab that does not disappear till I click a tab.

How can I render a hidden panel with a nice tab panel embedded in it, and then show that panel on command without the ghost tab? I guess I am searching for a YUI based recipe to pull this off, similar to commentable. I am trying to work my way up to a more complete understanding of how commentable works.

Thanks

Dave

jack.slocum
13 Oct 2006, 5:47 AM
There was a limitation in the tabs related to being rendered to an element with a display:none. That limitation should be corrected in the latest dev copy. I should be doing a release later today that will have the latest version, but you can also grab the latest dev copy here (http://www.jackslocum.com/build/yui-ext_32_3.js) that has the fix.

The best way to do this with the grid or tabs is to set the visibility to hidden when it's loading and then after initialization set the display to none if you need to. That's what I do with commentable.