2 Replies Latest reply on Jul 12, 2006 4:24 PM by Joe_Casey

    Can't get white background

    Joe_Casey Level 1
      I want every container to have a white background. No matter what I do the child panel gets a gray background. I've tried every combination of backgroundColor, backgroundGradient, backgroundAlpha, etc. that I can think of.

      Here's one try, using styleName="plain", which is supposed to create a white background. The application outside the panel is white, but the panel is gray.

      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" styleName="plain"
      <mx:Panel title="Panel" dropShadowEnabled="false" backgroundColor="#FFFFFF">
      <mx:Button label="Button" />

      I'm pretty sure I didn't have this problem with beta 3.

      Please, any method that gets a pure white background would be appreciated.
        • 1. Re: Can't get white background
          Level 7
          With your sample, I tried adding

          width="50%" height="50%"

          to the <mx:Panel> tag, and then I saw that the main content area of the panel
          did in fact have a pure-white background; but the title area and border area
          of the panel are gray. With your original sample, the entire content area is
          filled with the button, and the button itself has a gray background, so it
          makes it appear as if the backgroundColor attribute had no effect, when in
          fact it did have an effect.

          If you also want to set the title & border area of the Panel to white, I found
          that I was able to do that with


          And there is also borderAlpha, which defaults to 0.4.

          - Mike
          • 2. Re: Can't get white background
            Joe_Casey Level 1
            borderColor="#ffffff" works like a charm. I never would have dreamed that that big gray area was a border.

            Thanks once again, Mike.