TreeGrid text size is not right

I created a TreeGrid that it is working fine except the size of its tree node label. Its label is as big as “Ajax RIA system” in the header of this web site.

In the beginning I thought it was something wrong with my code, thus I copied and tested

http://www.smartclient.com/smartgwt/showcase/#tree_appearance_node_titles

It also showed big font.

Searched forum and it looked like nobody else experienced this problem. Does it happen to just me?

Most likely, the skin is not loading properly. Check your .jsp or .html file against the examples provided in smartclientSDK/templates and be sure the relative paths are all correct. If they appear to be correct, use Firebug to ensure that the assets of the skin (in particular skin_styles.css) are being loaded properly.

Oh, sorry, this is a SmartGWT, not SmartClient question. Only the last step applies: look with Firebug to see whether the skin files are not present where they are being requested.

Thank you for your reply.

I checked the Firebug. skin_styles.css and various image files seemed to be loaded properly. I can see folder icon and leaf icon.

I also noticed that the default empty treegrid message ‘no items to show’ were rendered in the right size.

All other form fields look fine except the label of tree node.

By inspecting the css with Firebug, I found the problem is in fact relating to the GWT itself.

Inherited from td

body, table td, select {standard.css (line 17)
font-family:Arial Unicode MS,Arial,sans-serif;
font-size:small;
}

As shown in Firebug, the property ‘font-size:small’ dervied from standard.css is the actual style of the tree nodes. It means somehow Smart Client own styles are overriden by this file.

My workaround is simple: redeclaring this style in module css to be

body, table td, select {
font-family:Arial Unicode MS,Arial,sans-serif;
font-size:11px;
}

it does solve the problem. However does anybody have a clue how it happened?

If you used GWT’s appGenerator to create the initial project, it includes a base CSS file. Do not include this file as the defaults it sets interferes with the SmartGWT CSS settings.

Sanjiv

You’re right. I disabled this file and it worked! Thanks a lot.