7 Replies Latest reply on Sep 6, 2006 7:29 PM by ReDan

    Displaying a component outside of its container

    dzlmbq
      I am creating a custom calendar component that will allow the user to either choose a date from a dateChooser or key in the date to an text input box.

      This component will be referenced within a Panel. I need the custom component to pop the calendar over the panel (Just like a mx:DateField functions). Is there any way to pop components to display the entire component outside of the contaner that owns it? I probably can use the pop-up manager but wanted to see if there were any other options.
        • 1. Re: Displaying a component outside of its container
          ntsiii Level 3
          If you base your app on a Canvas, then any component you declare at that level can be made to "float" above any other components.

          Tracy
          • 2. Re: Displaying a component outside of its container
            dzlmbq Level 1
            What I am trying to accomplish is to create a custom calendar component that doesn't require a pre-defined location on a canvas to overlay components behind it. I created a small application with parts of the component and a stock DateField component.

            The DateField component, when clicked, will pop on top of all components (like a tooltip). I want to have the DateChooser in the application work in the same manner. I tried the Flash Depth Manager and was able to only move components up or down the z-order inside the contained borders of a Panel.

            Here is the code excerpt:
            • 3. Re: Displaying a component outside of its container
              ntsiii Level 3
              Base your app on a Canvas. Declare the dateChooser at that level(at the end to make it automatically on top), and it will pop up over any other components.

              Tracy
              • 4. Re: Displaying a component outside of its container
                dzlmbq Level 1
                Moving the application to a cavnas wrapper isn't quite what I am looking to do. I am creating a custom date component that I will use just like a DateField in many places in my app. I need to be able to edit the date after it is selected. I created the custom component but cannot get it to pop on top of its Panel. It moved the panel to make room for the DateChooser. Something like this is what I am working with.
                • 5. Re: Displaying a component outside of its container
                  ntsiii Level 3
                  Unless you use a pop-up, I do not think you will be able to make a child be "above" its parent. You might be able to make a two-part component, with the calendar control going in the Application Canvas level, and the field-level component wherever you want. But bottom line is the floating control must be at the top-level of a Canvas.

                  Is there a reason you don't want to use a pop-up?

                  Tracy
                  • 6. Re: Displaying a component outside of its container
                    dzlmbq Level 1
                    I was playing around with a popup and could not get it to properly position behind the link. Also, when you do popup.deletePopUp() you lose the move and resize effects.
                    • 7. Re: Displaying a component outside of its container
                      Oh, i am having the same problem, isn't there any way that i can set the depth of a component between different containner? Did dzlmbq finally make it without using the popup method?

                      All i wanna do is a full screen function of a chart. And since the application make use of some viewstack. Making that chart in the canvas of the application means extra synconization needed, i am thinking if it is possible to swap the depth with a movieclip in the popup and resize the chart, so no need to depulicate it and pass the data to a different instance.