1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    doughboy is on a distinguished road

      0  

    Default Answered: Custom icons in tree Model

    Answered: Custom icons in tree Model


    In 2.5, the documentation about the method TreePanel.getStyle().setNodeOpenIcon is:
    Sets the global icon style for expanded tree items (defaults to 'tree-folder-open'). Individual tree items can override this value by setting the the item's icon style.
    I'm looking all over the place but can't find a way to change my individual items icons. All my items in the tree are extending (BaseTreeModel). I assume I'm not extending (or) implementing the good classe.

    Can someone shed some light on this?

  2. You should use the iconprovider.

    Code:
            tree.setIconProvider(new ModelIconProvider<ModelData>() {
                @Override
                public AbstractImagePrototype getIcon(ModelData model) {
                    // return your icon
                }
            });

  3. #2
    Sencha - GXT Dev Team
    Join Date
    Nov 2010
    Posts
    209
    Answers
    4
    Vote Rating
    -2
    Ersmarker has a little shameless behaviour in the past

      0  

    Default


    You should use the iconprovider.

    Code:
            tree.setIconProvider(new ModelIconProvider<ModelData>() {
                @Override
                public AbstractImagePrototype getIcon(ModelData model) {
                    // return your icon
                }
            });

  4. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    doughboy is on a distinguished road

      0  

    Default Solved!

    Solved!


    Thanks Ersmarker,

    I use the ClientBundle to ge the icons.

    Here's my code:

    Code:
    		tree.setIconProvider(new ModelIconProvider<ModelData>() {
    			@Override
    			public AbstractImagePrototype getIcon(ModelData model) {
    				return AbstractImagePrototype.create(Resources.ICONS.add());
    			}
    		});

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi