9 Replies Latest reply on Sep 15, 2008 4:59 AM by vikceo

    Title Bar

    vikceo
      Well i have a small desktop widget. I am trying to put a title bar. This title bar is having a name and a logo. The title bar should have rounded corners for top left and top right only. It should be a little transparent.

      I tried a lot of options like ApplicationControlBar, Container, Panel, Box etc.. but i am not achieve design. Some of these container miss the roundedBottomCorner property some are having other issues. What should be the way?

      for example below is the code using a panel. And all is fine except it shows a rectangle in the background below the rounder top coreners.

      <mx:Panel id="mainWindow"
      backgroundColor="#bbbbbb" alpha="0.6"
      width="100%" headerHeight="0"
      paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0"
      cornerRadius="15" roundedBottomCorners="false"
      borderThicknessLeft="0" borderThicknessRight="0" borderThicknessTop="0" borderThicknessBottom="0">
      <mx:HBox width="100%" horizontalAlign="left" paddingLeft="20" paddingTop="5">
      <mx:Image source="images/my_logo.png"/>
      <mx:Label id="titleLabel" text="My Title" color="#FFFFFF" fontSize="14" fontWeight="bold"/>
      <mx:Label id="versionLabel" text="" color="#FFFFFF"/>
      <mx:HBox width="100%" verticalAlign="top" horizontalAlign="right" paddingRight="15" paddingTop="3">
      <mx:Image id="mainWindowClose" source="images/icon_close.png" click="close();" mouseOver="manageMainWindowCloseIcon(event);" mouseOut="mainWindowCloseMouseOut(event);"/>
      </mx:HBox>
      </mx:HBox>
      </mx:Panel>
        • 1. Re: Title Bar
          Level 7

          "vikceo" <webforumsuser@macromedia.com> wrote in message
          news:ga9e1q$eut$1@forums.macromedia.com...
          > Well i have a small desktop widget. I am trying to put a title bar. This
          > title
          > bar is having a name and a logo. The title bar should have rounded corners
          > for
          > top left and top right only. It should be a little transparent.

          Is this an Air application?

          http://flexdiary.blogspot.com/2007/07/application-vs-windowedapplication.html


          • 2. Re: Title Bar
            vikceo Level 1
            its a windowedApplication
            • 3. Re: Title Bar
              vikceo Level 1
              any updates?
              • 4. Re: Title Bar
                Level 7

                "vikceo" <webforumsuser@macromedia.com> wrote in message
                news:gac63f$out$1@forums.macromedia.com...
                > any updates?

                Did you read the link I sent you to, including the comments?


                • 5. Re: Title Bar
                  vikceo Level 1
                  sorry you misunderstood me.. yes i went through that...

                  I am able to show a transparent header. I am using a HBox for that.. all is fine.. but it doesn't have a roundedBottomCorner property to turn of the bottom corner rounding. So, what should i use?

                  I searched other components too.. but could not achieve this
                  • 6. Re: Title Bar
                    Level 7

                    "vikceo" <webforumsuser@macromedia.com> wrote in message
                    news:gacjkp$98n$1@forums.macromedia.com...
                    > sorry you misunderstood me.. yes i went through that...
                    >
                    > I am able to show a transparent header. I am using a HBox for that.. all
                    > is
                    > fine.. but it doesn't have a roundedBottomCorner property to turn of the
                    > bottom
                    > corner rounding. So, what should i use?
                    >
                    > I searched other components too.. but could not achieve this

                    I didn't see that your panel was contained inside any other container, so
                    since the panel does support this, I'm not sure what the issue is.


                    • 7. Re: Title Bar
                      vikceo Level 1
                      Well when i use panel for this i get the desired shape but it actually shows it like a rectangle is drawn and over it the rounded top corners are drawn. means there is a background below the top rounded corners.
                      • 8. Re: Title Bar
                        Level 7

                        "vikceo" <webforumsuser@macromedia.com> wrote in message
                        news:gacqrs$g64$1@forums.macromedia.com...
                        > Well when i use panel for this i get the desired shape but it actually
                        > shows it
                        > like a rectangle is drawn and over it the rounded top corners are drawn.
                        > means
                        > there is a background below the top rounded corners.

                        Yes, the posts I pointed you were telling you how to get rid of the opaque
                        WindowedApplication background.


                        • 9. Re: Title Bar
                          vikceo Level 1
                          nope i tried it on my side but it still renders the background.. do u have any very simple working example which just on running shows a shape with upper corners rounded and lower corners flat?

                          it shld be something like below (where upper rectangle shld have upper corner rounded. lower component is a canvas.

                          ___________________
                          | |
                          ---------------------------------
                          | |
                          | |
                          | |
                          ---------------------------------