PDA

View Full Version : Set TreeGrid leaf icon



donstephano
20 Jan 2012, 9:43 AM
Hello,

I'm relativley new to EXT GWT and at the moment I'm struggeling with setting an icon for the leafs of a TreeGrid. My code looks for setting an icon like this:


TreeGrid<...> tree = new TreeGrid<...>(...);
tree.getStyle().setLeafIcon(IconHelper.create("icon"));

My question is how can I tell my application where "icon" is?

The following code works fine (still is nonsene). My leaf icon becomes a the same icon a closed node has


tree.getStyle().setLeafIcon((tree.getStyle().getNodeCloseIcon()));

What I want to now is, what do I need to configure to use additional icosn. Are there any resources provided by EXT GWT which I can include, if yes how can I do that?
I would really appreciate some help.

Regards,
Stephan

donstephano
20 Jan 2012, 11:14 AM
Finally I found a solution to access images and use them as icon.

I implemented a Interface which exetends ClientBundle.
Then by using GWT.create for creating an instance of the classe it is possible to access the image and use it as icon.

http://code.google.com/p/google-web-toolkit/wiki/ClientBundle