2 Replies Latest reply on Jul 15, 2010 9:32 PM by nileshnthete

    How to change color of panel title

    nileshnthete

      Hi,

       

      I am using flex builder 3 for generating graphs in flex.

      In that I want to changes color of panel title(from default to blue) in which my graph is included.

      When I set color property of panel then it changes all text present in that graph to blue. I just want to chane color of panel title.

      Can anyone help me in this?

       

      Nilesh Thete

        • 1. Re: How to change color of panel title
          Solydest

          You can use the titleStyleName property of the panel to point to a css declaration.  For example:

           

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
               <mx:Style>
                    .panelTitle {
                         color: #0000FF;
                    }
               </mx:Style>
               
               <mx:Panel x="428" y="21" width="250" height="200" layout="absolute" title="Title Text" titleStyleName="panelTitle">
                    <mx:Label horizontalCenter="0" y="20" text="Label Text"/>
               </mx:Panel>
          </mx:Application>
          

           

          If you run this code you'll notice that the panel title is blue but the label text inside the panel isn't affected by the style.

           

          Hope that works for you.

           

          Cheers

          • 2. Re: How to change color of panel title
            nileshnthete Level 1

            Thanks man....