[CLOSED] Treepanel - Use custom Icons

  1. #1

    [CLOSED] Treepanel - Use custom Icons

    I know there are lot of icons in the Ext icon list, but sometimes I need to use additional custom icons.

    What are the best practices to use custom icons? What's the Image format I should use and the resolution?

    How can I add some additional Icons to use them in the controls?

    I need to use custom icons on a treeview node but I didn't found a solution.

    have a good day!
    Last edited by Daniil; Feb 25, 2014 at 3:43 AM. Reason: [CLOSED]
  2. #2
    Hi @John_Writers,

    Please use a Node's IconFile of IconCls.
    <ext:Node Text="Node 1" IconFile="resources/images/test.png" />
    <ext:Node Text="Node 2" IconCls="my-icon" />
        .my-icon {
            background-image: url(resources/images/test.png);
    Please note that <style> is not required for IconFile.
  3. #3
    Ok, I used the IconFile property, but I can see only a little part of the image, because the image is too big.

    What's the best format and resolution to convert the images to?

  4. #4
    I think you have to decrease the image's size manually in some utility for editing of images. It should be 16x16.
  5. #5
    perfect! with the 16x16 png image it works well, but,

    I need to have a bigger tree, with bigger icons, like 32x32 or 64x64.

    How can I make the ext tree bigger?

    Thanks for your time.

    Have a good day.
  6. #6
    It is not supported by default, but you can try to get it via CSS.
    <ext:TreePanel runat="server" Cls="my-tree">
        .my-tree .x-tree-icon {
            width: 24px;
            height: 24px;

Similar Threads

  1. [CLOSED] custom Icons
    By JCarlosF in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 15, 2013, 8:53 PM
  2. Replies: 5
    Last Post: Jul 22, 2011, 7:41 AM
  3. Replies: 5
    Last Post: Mar 23, 2011, 9:57 AM
  4. [CLOSED] TreePanel Example not working with custom Icons
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 16, 2009, 11:21 PM
  5. [CLOSED] Custom TreeNode Icons for a dynamic TreePanel
    By conman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 15, 2009, 10:22 AM

Tags for this Thread

Posting Permissions