2 Replies Latest reply on Sep 19, 2008 3:51 AM by fccobb

    Panel Border And Background Gradient

    Level 1
      Hi

      This is probably really easy so apologies if I've missed something obvious.

      What I want to do is to get a background gradient fill for the border of a panel and then a different gradient fill for the background.

      I've tried creating an SWC file from Flash CS3. It looked like it was going to work but when I added content to the Panel it placed the content over the Panel Title area rather in the content area.

      So then I tried creating a graphic skin using a 26 x 26 pixel gradient fill box of the appropriate colors but this would only allow me to set the skin for the background and border together and this is not what I want.

      When I watched the video on Adobe TV about doing graphical skins I also watched one about Programmatic skins which looked like it might help but it did look very complicated and I was wondering if someone could help as I'm quite new to this.

      Also, if there is a simpler way then please tell me as I would be very grateful.

      Thanks

      Chris
        • 1. Re: Panel Border And Background Gradient
          Level 1
          Just as an extra piece of information - I found the code for doing Programmatic skins in the O'Reilly Flex Cookbook and implemented an example just to change the border to a green color.

          Again I seem to have the problem where inside the panel overwrites the Panel Title once I have applied the custom skin - the same problem I got when I I used Flash CS3 to create the SWC file - now I'm really confused - I would be really grateful if someone could help out.

          I have attached the code for the class that does the custom skin and also the MXML that calls it.

          Thanks

          Chris
          • 2. Re: Panel Border And Background Gradient
            Level 1
            Hi again

            Just found another post on this forum to a slightly different question but what it boils down to is that this a bug and Adobe aren't going to fix it.

            The workaround is to BorderTopPad the panel to a value that takes the content below the header bar and this works.

            Wish they had fixed it though as a lot of people seem to have had the same problem and it does waste a lot of time (2 days in my case) trying to sort out a problem that doesnt really have a proper solution.

            See site:

            http://dougmccune.com/blog/2008/01/17/followup-about-flex-panel-bug/

            Hope nobody else wasted too much time on this - if you did sorry and thanks.

            Cheers

            Chris