-
30 Nov 2011 5:13 AM #1
TreeGrid node icons
TreeGrid node icons
Another "not really a bug, but should be fixed, though" issue.
I set my node images like that:
Yes, those icons (+ and -) are added but they don't replace the default ones (gxt triangles are still there):Code:tree.getStyle().setNodeCloseIcon(myResources.joint_minus()); tree.getStyle().setNodeOpenIcon(myResources.joint_plus());
treegrid node icons.png
-
30 Nov 2011 5:17 AM #2
My fault... "node icons are of course the NODE icons, not the JOINT" icons

EDIT: is there any way to change those icons? In GXT2 this was no problem. Now those icons are managed by the TreeAppearance - but I can't find any way to set my own TreeAppearance (only GridAppearance)..
-
30 Nov 2011 6:39 PM #3
Yes, we do need to expose a way to set the icons (and other appearance details) for the Tree in the TreeGrid on an individual basis, but the theming setup still works - you can still configure the entire application's theme to have a specific appearance impl.
The interface com.sencha.gxt.widget.core.client.tree.Tree.TreeAppearance gets its implementation from these lines in com/sencha/gxt/theme/blue/Blue.gwt.xml:
indicating that the class com.sencha.gxt.theme.blue.client.tree.BlueTreeAppearance should be used whenever GWT.create(TreeAppearance.class) is called.Code:<replace-with class="com.sencha.gxt.theme.blue.client.tree.BlueTreeAppearance"> <when-type-is class="com.sencha.gxt.widget.core.client.tree.Tree.TreeAppearance" /> </replace-with>
You can add these lines to your own module to point to your own appearance implementation.
We'll update this bug when there is a way to set the specific tree appearance info for the TreeGrid, but in general, you'll want to use this other way, to build your own application specific themes.
-
5 Dec 2011 11:26 AM #4
We have added support for joint icons with TreeStyle. So you can change icons the same way you change the node icons. We also added a constructor that allows you to specify a TreeAppearance. Change will go out in next release later this week.
-
12 Dec 2011 6:55 PM #5
Fixed in beta 1.
Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote