java - GXT 3 change tab style (add css) -


gxt 3 has function, adds tab tabpanel

      tabpanel.add(html, new tabitemconfig(title, true)); 

i have change style of name of tab , contents. these have no effect:

           tabpanel.setstylename("tab-title", true);            html.setstylename("tab-title", true); 

tabitemconfig has no method change style. how achieve?...

i see you've found solution, leave here, because it's quite simple , may save somebody's time:

class stylabletabpanel extends tabpanel {     public void applytabstyles(widget widget, string styles) {         finditem(getwidgetindex(widget)).applystyles(styles);     } } 

then:

tabpanel = new stylabletabpanel(); html shorttext = new html("lorem ipsum..."); tabpanel.add(shorttext, "short text"); html longtext = new html("<b>lorem ipsum dolor sit amet...</b>"); tabpanel.add(longtext, "long text"); tabpanel.applytabstyles(longtext, "margin-left: 300px;"); 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -