1 Reply Latest reply on Jan 16, 2009 9:14 AM by Newsgroup_User

    Tree icon does not appear

    Peter Hahmann
      Hi, I'm using a custom TreeItemRenderer and am having an issue with the icon. The icon won't appear and i don't konw why. When I click on an item and set a breakpoint on it's handler i get access to the icon property(changed from protected to public) and the imagesize, source, etc seams ok...but it still wont appear.

      Does anyone have a clue?

      regards,
      Peter

      p.s. sorry for my regular/bad english.
        • 1. Re: Tree icon does not appear
          Level 7

          "Peter Hahmann" <webforumsuser@macromedia.com> wrote in message
          news:gkq0vf$ftr$1@forums.macromedia.com...
          > Hi, I'm using a custom TreeItemRenderer and am having an issue with the
          > icon.
          > The icon won't appear and i don't konw why. When I click on an item and
          > set a
          > breakpoint on it's handler i get access to the icon property(changed from
          > protected to public) and the imagesize, source, etc seams ok...but it
          > still
          > wont appear.

          First, why are you using a custom itemRenderer for this? Tree has all kinds
          of properties for setting custom icons, and I think it even has an
          iconFunction.

          Second, you should probably make sure that your code to draw the icon
          happens when you think it is happening. I think when I've done similar
          things to what you've done I've wound up with problems where the icon wasn't
          destroyed when I thought it was, so the !icon condition wasn't true, or
          something like that. But then I was extending the default itemRenderer and
          had to contend with the original developer's assumptions about what someone
          would want to do.

          Third, I couldn't see your updateDisplayList() or measure() code... You need
          to make sure the layout and measurement code knows that your icon is drawn.
          If you're not doing that, you should.

          HTH;

          Amy