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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment