View Full Version : Common Tree Icons...

29 Jun 2010, 10:18 PM

Rigrh image is tree example in GXT site.

Left image is to wanted image.

The deffenent is Icon.

I want to show icon with lines...

this directory is to involve tree icons.
but thess Icons are not used in example.

--- Source ---
treePanel.getStyle().setJointCollapsedIcon( IconHelper.createPath( "./resources/gxt/images/default/tree/elbow-end-plus.gif" ) );
treePanel.getStyle().setJointExpandedIcon( IconHelper.createPath( "./resources/gxt/images/default/tree/elbow-end-minus.gif" ) );
treePanel.getStyle().setLeafIcon( IconHelper.createPath( "./resources/gxt/images/default/tree/elbow-end.gif" ) );
treePanel.getStyle().setNodeCloseIcon( IconHelper.createPath( "" ) );
treePanel.getStyle().setNodeOpenIcon( IconHelper.createPath( "" ) );

five functions comvination don't show that I want.

Help me... plz.

30 Jun 2010, 12:25 AM
Sorry, but your English is quite hard to understand.

Well, try using the setIconProvider method in the treePanel.
You can then specify the icons based on the information present in the model.


30 Jun 2010, 12:57 AM
Sorry. my English is quite hard to understand. kaka

My first language is not English.

Thank you for your reply.

But i don't understand.

Please show me simple codes?

A matter of tree's line.

30 Jun 2010, 3:01 AM
treePanel.setIconProvider(new ModelIconProvider<YourModel>() {
public AbstractImagePrototype getIcon(YourModel model) {
//prepare here the AbstractImagePrototype based on your model properties

30 Jun 2010, 3:33 PM
Hello ,
Hav u solved your problem ?
i m looking to do a similar thing , and i m kind of stucked.

Maybe Sven can give some advices ? :)


30 Jun 2010, 3:37 PM
The lines shown in the first tree are not supported. We are thinking about adding support for them, but there is no decision yet.

The icons can be changed easily as pointed out by micgala

30 Jun 2010, 3:45 PM
Thanks for the quick reply Sven.
Those lines would be a nice add imho.