Question

Is there any way to hide/show TabBar items in TablayoutPanel

Was it helpful?

Solution

setVisible will just set the style attribute display to none . So you can create your own API like this,

 public void hideTabItem ( Widget tabItem, boolean hideFl )
 {
     hideTabItem ( tabItem.getElement(), hideFl );
                        OR
     tabItem.setVisible ( hideFl );
 }

private static native void hideTabItem (Element elem, boolean visible) 
/*-{
     elem.style.display = visible ? '' : 'none';
     elem.setAttribute('aria-hidden', String(!visible));
 }-*/;

NOTE: To know more about aria-hidden property visit the link Aria-Hidden-Property

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top