Loading ...
Sorry, an error occurred while loading the content.
 

TreeView nodes and transparent PNG icons

Expand Messages
  • binaryjohn
    I am attempting to use PNGs for node icons. My problem is: the icons render enclosed in a grey box. Apparently there is a well know IE bug that prevents PNG
    Message 1 of 3 , Feb 26, 2007
      I am attempting to use PNGs for node icons. My problem is: the icons
      render enclosed in a grey box. Apparently there is a well know IE bug
      that prevents PNG transparencies from rendering correctly (upgrading
      internet explorer is not an option for me). The solution to the problem
      is to add:

      filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
      (src='img/iconstrip.png', sizingMethod='image');

      To my style sheet. The nodes to my tree are added dynamically and I
      don't know where to add the (mentioned above) style.
    • Eric Miraglia
      binaryjohn, Adam Moore, the author of the TreeView Control, has a really nice example of how to use custom icons in the examples roster for TreeView:
      Message 2 of 3 , Feb 27, 2007
        binaryjohn,

        Adam Moore, the author of the TreeView Control, has a really nice example of how to use custom icons in the examples roster for TreeView:


        Take a look at what he did there and see if that gives you the answer you need.  You may also want to dig around in the generated DOM of your TreeView using FireBug to get a sense of what elements and CSS styles are involved.  Check out the YUI Theater for a video from FireBug's author, Joe Hewitt, about how to do that.

        Regards,
        Eric

        ______________________________________________
        Eric Miraglia
        Yahoo! User Interface Library



        On Feb 26, 2007, at 2:40 PM, binaryjohn wrote:

        I am attempting to use PNGs for node icons. My problem is: the icons
        render enclosed in a grey box. Apparently there is a well know IE bug
        that prevents PNG transparencies from rendering correctly (upgrading
        internet explorer is not an option for me). The solution to the problem
        is to add:

        filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
        (src='img/iconstrip.png', sizingMethod='image');

        To my style sheet. The nodes to my tree are added dynamically and I
        don't know where to add the (mentioned above) style.


      • binaryjohn
        Eric, Thank you for your reply. However, my problems are not customizing my icons. I am able to to place custom icons into a Tree. My dilema is when the icon
        Message 3 of 3 , Feb 28, 2007
          Eric,

          Thank you for your reply. However, my problems are not customizing
          my icons. I am able to to place custom icons into a Tree. My dilema
          is when the icon shows up it is surrounded by a grey box, because of
          the way ie 5.5 renders png-24.

          -bj
          >
          > binaryjohn,
          >
          > Adam Moore, the author of the TreeView Control, has a really nice
          > example of how to use custom icons in the examples roster for
          TreeView:
          >
          > http://developer.yahoo.com/yui/examples/treeview/customicons.html
          >
          > Take a look at what he did there and see if that gives you the
          answer
          > you need. You may also want to dig around in the generated DOM of
          > your TreeView using FireBug to get a sense of what elements and
          CSS
          > styles are involved. Check out the YUI Theater for a video from
          > FireBug's author, Joe Hewitt, about how to do that.
          >
          > Regards,
          > Eric
          >
          > ______________________________________________
          > Eric Miraglia
          > Yahoo! User Interface Library
          >
          >
          >
          > On Feb 26, 2007, at 2:40 PM, binaryjohn wrote:
          >
          > > I am attempting to use PNGs for node icons. My problem is: the
          icons
          > > render enclosed in a grey box. Apparently there is a well know IE
          bug
          > > that prevents PNG transparencies from rendering correctly
          (upgrading
          > > internet explorer is not an option for me). The solution to the
          > > problem
          > > is to add:
          > >
          > > filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
          > > (src='img/iconstrip.png', sizingMethod='image');
          > >
          > > To my style sheet. The nodes to my tree are added dynamically and
          I
          > > don't know where to add the (mentioned above) style.
          > >
          > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.