6 Replies Latest reply on Sep 16, 2008 1:07 PM by EvolvedDSM

    displaying panel over another component

    nash99
      Hi ,
      I was trying to display a component(link bar) when clicked or hovered on it drops a panel (this panel contains some data)
      It should be something similar to the menu bar , when we hover over it or click on it as the menu bar displays menu items , similarly I need to display a panel or a test box.
      I have this component(link bar ) just beside the menu bar in my application (I cannot make this a menu bar).

      thanks
        • 1. Re: displaying panel over another component
          Gregory Lafrance Level 6
          Seems like you could make this UI design simpler, as it seems like you are trying to create a menu from a linkbar, but in any case, I guess you could use states and wipe down/wipe up transitions.
          • 2. Re: displaying panel over another component
            EvolvedDSM Level 2
            Nash, you will need an eventListener along these lines:

            linkBarID.addEventListener(MouseEvent.MOUSE_OVER,doThisFunction);
            Add that line to a function that gets called from creationComplete. Then you'll create the function doThisFunction(), which could call a state change or a popup window to display the information you wanted.

            The above eventListener would be for the "hover" effect you wanted. You can adjust it to listen for mouse clicks also if needed.

            That's all the help I can give on this though.
            • 3. Re: displaying panel over another component
              nash99 Level 1
              I agree with you , but I donot want to change the states ,
              instead I want to show the panel as something like a drop down (similar to the click on a menu bar which slides down the menu items) , actually the problem is I dont want the panel to be a part of the page , I just want it to be just like the menu bar .
              Can you please suggest me in this direction(does flex have any functionality like this).
              thanks
              Nash
              • 4. Re: displaying panel over another component
                EvolvedDSM Level 2
                Well I understand what you want, but getting what you want I'm not sure I can answer. I could be totally wrong on this but I don't think a link bar could have the functionality that a menu bar does. After all, its called a menu bar for a reason =P Same with why they named a link bar as they did.

                What's the reason that you cannot make this component as another menu bar?
                • 5. Re: displaying panel over another component
                  nash99 Level 1
                  I can't use a menu bar because I need to just display a panel , instead of the menu items.
                  So the solution would be I should be able to display a panel instead of the menu items.
                  Do you guys think its feasible.
                  thanks a lot guys , I really appreciate your help
                  Nash
                  • 6. Re: displaying panel over another component
                    EvolvedDSM Level 2
                    Just from doing a short test on my end... while I could get a mouse_over eventListener on the link bar itself to register, it didn't know which link I was hovering over. Maybe there's logic out there to detect this, but it's out of my knowledge.

                    You would need to set it up like this I guess:

                    initApp(){ // called from creationComplete
                    yourLinkBar.addEventListener(MouseEvent.MOUSE_OVER,someFunc);
                    }

                    someFunc(){
                    if(mouse_over on link 1){
                    create panel 1;
                    }else{
                    create panel 2;
                    }

                    Where I am stuck is how the eventListener can determine which link the mouse is hovering over. Any clue ?