1 Reply Latest reply on Jan 6, 2012 10:44 AM by Flex harUI

    Odd Flex setStyle() Problem

    Fatlog Level 1

      Hi,

       

      I've an odd issue thats driving me mad!

      I have a simple HBox which I use setStyle to change the border and background color.

      The border color is changed on mouseOver and the background color is changed based on an event firing.

      This works fine in one scenario but when I fire the evnet from another location it doesn't work.

      The setStyle() code is executing and the setStyle() command is completing but the component is not updating its display.

       

      Anyone come across this before?

        • 1. Re: Odd Flex setStyle() Problem
          Flex harUI Adobe Employee

          Check the invalidateDisplayListFlag on the component you are about call setStyle() on.  If it is true, then check the call stack and see if that component is currently updating itself.  That’s one way a component won’t respond to style changes.

           

          Another is that something actually sets the style back to what it was.  Make sure that isn’t happening.