Results 1 to 3 of 3

Thread: Tree Panel Node Icon

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2014
    Posts
    30
    Answers
    1

    Default Answered: Tree Panel Node Icon

    I am trying to specify new icon for each node in a tree panel, I have tried using icon and iconCls property. My icons are bigger in size and it does't shrink the icon into the size I am specifying in iconCls class, rather it crops my bigger icon up to the size I specify in css class and display only that cropped portion as node icon.
    Cropped Icons.png
    When i don't specify iconCls and just use icon property icon stretched out like this;

    Streched icon.png
    Issue is icon property does not use icon's URL as "src" path rather uses URL in inline style. i.e.

    <img class=" x-tree-icon x-tree-icon-leaf icon-adjustsize" role="presentation" style='background-image: url("../icons/guitar_48x48.png");' src="http://ts50/images/default/s.gif"></img>
    Css class is;
    .icon-adjustsize { height: 16px; width: 16px; vertical-align: middle; background-repeat:no-repeat; background-position:center !important;}

    When i change this html manually and specify the src path as background image url it works fine and shrink the icon to proper size. I have hudge number of icons which are being used in my application i cannot remake them to size 16 * 16.

    Any help in this regard will be highly appreciated.

  2. You are probably looking for background-size CSS3 property.

    See also ExtJS Tree Icon Plugin.

  3. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    You are probably looking for background-size CSS3 property.

    See also ExtJS Tree Icon Plugin.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  4. #3
    Sencha Premium Member
    Join Date
    Jan 2014
    Posts
    30
    Answers
    1

    Default

    Thanks jsakalos, that was my thing

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •