Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

"titleStyle" attribute works properly only for tabs with an icon

$
0
0
Calling Tab.setTitleStyle() should set a separate CSS style for the title text of a tab.

I've noticed that it works only for tabs having an icon: i.e. if you create a tab specifying a title and an icon, set the titleStyle attribute and add it into a tabset, you see the specified title style in the generated dom element, while if you simply omit setting the icon, then the dom element has a default style name (i.e. tabButtonStop).

Follows an excerpt showing how to reproduce this issue simply modifying the tabs orientation example in the showcase.
Code:

...
//calling the single argument constructor (omitting the icon path param) prevents the "titleStyle" attribute to work
//Tab tTab1 = new Tab("Blue", "pieces/16/pawn_blue.png"); 
Tab tTab1 = new Tab("Blue"); 
//set the CSS style name, expected for the title elements at the dom level
tTab1.setTitleStyle("foo");
...

Could you please tell me if I'm doing something wrong or if it is simply a bug?

Reproduced on SmartGWT 4.1p (SmartClient Version: v9.1p_2014-07-15/LGPL Development Only (built 2014-07-15)) and SmartGWT 4.0p

Viewing all articles
Browse latest Browse all 4756