-
16 Jun 2009 7:40 PM #1
2.0 M3: Tree icons disappear
2.0 M3: Tree icons disappear
After upgrading from M2 to M3 and using TreePanel my tree icons (arrows, open/closed folder) are gone. Is it possible some images were not included in the release or is there something I need to add in code to use the default icons?
Thanks,
-
17 Jun 2009 2:27 AM #2
I have also updated a project from M2 To M3 however the default folders were fine without modifcation. The leaf nodes however were not as the method
setLeafIconStyle has now it seems been replaced by setLeafIcon which means you have to use theto use css classes directly on the leaf nodes.Code:IconHelper.create("Css_style_name")
Otherwise you set up a interface of Imagebundle like the explorer example does
Code:package com.extjs.gxt.samples.client.icons; import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.ImageBundle; public interface ExampleIcons extends ImageBundle { @Resource("table.png") AbstractImagePrototype table(); @Resource("music.png") AbstractImagePrototype music(); }
-
17 Jun 2009 8:08 AM #3
Looking at that javadocs....
Looking at that javadocs....
Shouldn't TreePanel be using the IconSupport interface?
-
17 Jun 2009 8:09 AM #4
No. That would say that the treepanel itself would have an icon, which is not the case.
-
17 Jun 2009 9:07 AM #5
True, yet FormPanel, ContentPanel, CollapsePanel all implement that interface.
-
17 Jun 2009 9:15 AM #6
Yes, as all three you mentioned support an icon on the top left.
-
17 Jun 2009 9:38 AM #7
Let me backup a bit, this is probably just a simple syntax question:
This was working with M2 and seemed to use the default icons
M3 changed the API and this satisfies the compiler but there are no icons.Code:TreePanel<ModelData> tree = new TreePanel<ModelData>(store); tree.setIconProvider(new ModelIconProvider<ModelData>() { public String getIcon(ModelData model) { return null; } });
I assume something is wrong in code, could you maybe point me in the right direction?Code:TreePanel<ModelData> tree = new TreePanel<ModelData>(store); tree.setIconProvider(new ModelIconProvider<ModelData>() { public AbstractImagePrototype getIcon(ModelData model) { return null; } });


Reply With Quote