Hi all,

I'm trying to change the padding in the TreeItems I have in a tree. By
default, the TreeItem html code generated looks like this:

<div style="padding: 3px 3px 3px 23px; margin-left: 0pt;">
<div id="gwt-uid-2" class="gwt-TreeItem" style="display: inline;"
role="treeitem">
SOME HTML CODE OF A WIDGET
</div>
</div>

As you can see there is a 23px left padding for the indentation of the
elements, that is the one I want to modify. I have used different
approaches, firstly, I tried to create a style and add it,with the
code:

treeItem.addStyleName("divwithoutpadding");

. divwithoutpadding{
        padding-bottom: 3px;
        padding-left: 3px;
        padding-right: 3px;
        padding-top: 3px;
}

and the resulting code is:

<div class="divwithoutpadding" style="padding: 3px 3px 3px 23px;
margin-left: 0pt;">
<div id="gwt-uid-2" class="gwt-TreeItem" style="display: inline;"
role="treeitem">
<a class="gwt-Anchor" tabindex="0" href="prueba.html"
name="nombre1">cadena10</a>
</div>
</div>

but this does not work, then I tried :

treeItem.getElement().getStyle().setProperty("padding", "3");

and

treeItem.getElement().getStyle().setProperty("paddingLeft", "3");

but though I can see the html code of the treeItem component in debug
mode with the padding set as I want, when I see again in the browser,
I get the same 23px left padding, I have been following the tree until
I add it to the RootPanel, and the padding continue always with the
one I set, so, seems that in the process of the final code generation
the value is changed, am I missing something or there is a bug?

thanks in advance

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to