PDA

View Full Version : isVisible/isDisplayed on a composite?



fjanon
27 Jul 2007, 8:21 AM
How can I get a composite with the visible elements of a composite?

I have a composite with several elements, 0 or more of the elements are visible. I want a composite with all the visible elements from the first composite. isVisible/isDisplayed return a boolean on an element, should they return a composite when applied to a composite?

Thanks

Fred

sebsei
27 Jul 2007, 8:40 AM
Try:



comp1 = ...
comp2 = new Ext.CompositeElement();
comp1.each(function(item) {
if (item.isDisplayed()) comp2.add(item);
}



Sebastian