panel button

Posted on 2009-02-09
Last Modified: 2013-11-11
hello experts,

how can i create a button on flex panel so that on click of that panel is closed

thanks in advance
Question by:mkumar0282
    LVL 19

    Accepted Solution

    Hide/Show you mean?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="" layout="absolute">
    	<mx:Panel id="p" x="203" y="248" width="250" height="200" layout="absolute">
    		<mx:Label x="10" y="10" text="This is a panel"/>
    	<mx:Button x="203" y="209" label="Hide/Show" click="p.visible = !p.visible"/>

    Open in new window

    LVL 37

    Expert Comment

    Do you mean a close button of a popup panel/dialog?

    Like this one:
    1) Surf to
    2) Expand the first node "Vsiual Components"
    3) Expand the node "General Controls"
    4) Select the leaf node "Alert"
    5) On the right you have some examples. Click the buttons. The corresponding code is at the bottom.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Title # Comments Views Activity
    Error 2032 in all the browser 6 2,753
    How width columns automaticaly 4 390
    Array is not working ( AS2 ) 4 139
    Video sharing with user login 3 181
    Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
    While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now