1 Reply Latest reply on Apr 19, 2010 10:01 PM by Flex harUI

    rollover with TreeItemRenderer

    malachite1234

      Hi. I have an mx:Tree component that uses a TreeItemRenderer. The rollover and selection highlighting isn't working when I use the custom renderer. I want to draw the selection and rollover rectangles in the renderer, but I can't figure out how to detect in the TreeItemRenderer when the mouse is over a particular item. is there a way to detect mouseOver and click events within the renderer? If not, what is the best way to draw the highlight?

       

      Thanks!

        • 1. Re: rollover with TreeItemRenderer
          Flex harUI Adobe Employee

          The highlight and selection are drawn behind the renderer so if you have

          opaque backgrounds you won't see them.

           

          You can make the renderer have transparent backgrounds, or you can override

          updateDisplayList in the renderer, and make calls to

          Tree(owner).isItemSelected and isItemHighlighted to determine when to draw

          your own selection and highlighting in the renderer.