Friday, June 28, 2013

Re: Style GWT-Tree to a non hierarchal Layout

Well its kind of hardcoded inside Tree/TreeItem.

You can subclass TreeItem and override TreeItem.insertItem(int beforeIndex, TreeItem item) to eliminate the margin. The margin is currently set in TreeItem.insertItem() line 575.

The 3px padding seems to be set by the TreeItem as base padding and then Tree increases left/right padding depending on your TreeItem image width. See TreeItem.TreeItemImpl.initializeClonableElements(), Tree.showLeafImage(TreeItem item) and Tree.setImages(ImageAdapter images, boolean useLeafImages). Not sure if you can change this behavior to your needs without copying the whole Tree/TreeItem class into your project so you can freely modify them.

-- J.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment