Need TitleWindow close button to just do its thing

Hello everyone
I have an editable datagrid in a TitleWindow with an enabled close button.
If I activate the close button with a function, it does not allow me to edit the data grid (and performs its function). How can I just have the close button do its thing (but allowing me to edit my gata grid in the window? It performs the function  if I try to edit the datagrid. Its drivig me a little crazy. So I will take some asprins, and hope for some wise soul to help me
This is the sample code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
        <![CDATA[
        import mx.collections.ArrayCollection;
        import mx.events.DataGridEvent;
        [Bindable]
        private var jan:Number = 200;
        private var feb:Number = 123;
        private var mar:Number = 67;
        private var apr:Number = 108;
        private var may:Number = 126;
        private var jun:Number = 199;
        private var jul:Number = 199;
        private var aug:Number = 199;
        private var sep:Number = 199;
        private var oct:Number = 199;
        private var nov:Number = 199;
        private var dec:Number = 199;
        private var dataset:ArrayCollection = new ArrayCollection( [
            { Month: "January", Data: jan },
            { Month: "Febuary", Data: feb },
            { Month: "March", Data: mar },
            { Month: "April", Data: apr },
            { Month: "May", Data: may },
            { Month: "June", Data: jun },
            { Month: "July", Data: jul },
            { Month: "August", Data: aug },
            { Month: "September", Data: sep },
            { Month: "October", Data: oct },
            { Month: "November", Data: nov },
            { Month: "December", Data: dec } ]);
        ]]>
    </mx:Script> 
    <mx:ViewStack id="viewstack1" width="464.46967" height="408.18182" horizontalCenter="-12" verticalCenter="0">
        <mx:Canvas id="Data" width="100%" height="100%">
            <mx:TitleWindow id="DataA" width="450" height="350" layout="absolute" title="Data" horizontalCenter="0" verticalCenter="-10" showCloseButton="true" >
                <mx:DataGrid x="11" y="10" width="405.98486" height="290" dataProvider="{dataset}" editable="true">
                    <mx:columns>
                        <mx:DataGridColumn width="200" headerText="Month" dataField="Month" editable="false" sortable="false" />
                        <mx:DataGridColumn headerText="Data" dataField="Data" editable="true" sortable="false" />
                    </mx:columns>
                </mx:DataGrid>
            </mx:TitleWindow>
            <mx:Button x="7" y="386" label="Graph" click="viewstack1.selectedChild=Graph;" />
        </mx:Canvas>
        <mx:Canvas id="Graph" width="100%" height="100%">
            <mx:TitleWindow  id="GraphA" width="450" height="350" layout="absolute" title="Graph" horizontalCenter="0" verticalCenter="-10" showCloseButton="true" click="viewstack1.selectedChild=Data;">
                <mx:ColumnChart x="8" y="8" id="columnchart1" width="412.12122" height="290" dataProvider="{dataset}">
            <mx:horizontalAxis>
                <mx:CategoryAxis categoryField="Month"/>
            </mx:horizontalAxis>
                    <mx:series>
                        <mx:ColumnSeries displayName="Series 1" xField="Month" yField="Data"/>
                    </mx:series>
                </mx:ColumnChart>
            </mx:TitleWindow>
        </mx:Canvas>
    </mx:ViewStack>
</mx:Application>

It's still not really clear what you want to do here.  Do you mean you want to be able to click the close (X) button while editing a field in the datagrid, but have the field remain in edit mode?  I ran your example (minus charting components I don't have at home, snowed out of work and Flex Pro at the moment ) and it seems to behave "as I would expect", but maybe I just don't understand what your goal is.
Also - if you're using the close (X) button for anything other than closing a dialog... I wouldn't recommend doing so from a UI design perspective.  Users will expect a 'close' button to behave as it does in other applications, to close the panel/dialog/window (not the change the view within a dialog).  If you intend on using it to back out of a sub-view I'd reconsider.  You may want to try a TabNavigator (lazy man's ViewStack but quite effective if it fits your application) instead of a ViewStack.

Similar Messages

  • Ffox help says "To close a tab, just click its close button." I did this. But still got the message about to close 5 tabs. I could close one tab at a time, in the past but now can't. How do I close just one tab?

    WTF? you ask for details then tell me I have exceeded the 255 character limit. Clicking on links in an email I wound up with 5 open tabs. Tried to close the last tab opened. I got pop-up warning I was about to close 5 tabs.

    ya I'm aware of the shortcut keys. Been using a mac since they came out. She is used to interaction with the mouse, hence the specific question as to where the X has gone.

  • Grab close button from TitleWindow

    Hi.  I'd like to use the close button in the TitleWindow in a VBox (or other container).  The TitleWindow isn't sufficient for my purposes, I pretty much just need a VBox, but I still need a close button.  Rather than dropping a button down, I'd like to maintain visual consistency and use the TitleWindow close button.  Do you know how I could get this button?  What code would I have to copy?  Once I have the button, I can attach the event handling I need to it.  Thanks!
    Using Flex 3.4 in Flex Builder 3.

    This should work (I grabbed the default mx:TitleWindow icon assets and used then as an mx:Button icon):
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Style>
            .titleWindowIcon {
                up-icon: Embed(source="Assets.swf", symbol="CloseButtonUp");
                over-icon: Embed(source="Assets.swf", symbol="CloseButtonOver");
                down-icon: Embed(source="Assets.swf", symbol="CloseButtonDown");
                disabled-icon: Embed(source="Assets.swf", symbol="CloseButtonDisabled");
        </mx:Style>
        <mx:Button styleName="titleWindowIcon" label="Button w/ special icon" />
    </mx:Application>
    Or, if you want to create a custom button and use the icon as a skin, this may get you closer:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Style>
            .titleWindowIconAsSkin {
                up-skin: Embed(source="Assets.swf", symbol="CloseButtonUp");
                over-skin: Embed(source="Assets.swf", symbol="CloseButtonOver");
                down-skin: Embed(source="Assets.swf", symbol="CloseButtonDown");
                disabled-skin: Embed(source="Assets.swf", symbol="CloseButtonDisabled");
        </mx:Style>
        <mx:Button styleName="titleWindowIconAsSkin" />
    </mx:Application>
    You can look at the defaults.css file here:
    C:\dev\flexSDKs\flex_sdk_3.4.0.9271\frameworks\projects\framework\defaults.css
    Peter

  • Close Button for Web Dynpro in an iView launched from UWL

    Hi All, this sounds like such a simple thing but its really got me thinking.
    Have a web dynpro application launching form the UWL into an iView (using the IViewLauncher, I'm using this so I can change some visual effects of the application with the iView).  The application is the LeaveApprover application.
    Need a close button on the confirmation screen.  Have tried the following code called from a Close button:
         try {
              String url  = WDURLGenerator.getWebResourceURL(wdComponentAPI.getDeployableObjectPart(),"closepage.html");
              TaskBinder.getCurrentTask().getClient().sendRedirect(url, 0);
         } catch (Exception e) {
              e.printStackTrace();
    The closepage >>
    function closeWindow()
    {var currWindow = window.top;
    currWindow.opener = window.top;
    currWindow.close();
    onload run the closeWindow function
    This is a test file to close the window....
    This works if I use the standard UWL launch but DOES NOT WORK with the iViewLauncher.
    Also tried creating an exit plug in the interface view and calling it from my close button, but no luck with either.
    Please help.  Thanks Brian
    Edited by: Brian Carter on Dec 8, 2009 11:54 AM
    Edited by: Brian Carter on Dec 8, 2009 11:55 AM
    Edited by: Brian Carter on Dec 8, 2009 11:58 AM
    Edited by: Brian Carter on Dec 8, 2009 11:59 AM
    Edited by: Brian Carter on Dec 8, 2009 11:59 AM

    Hi Brian,
    we had a similar problem in the past. We wanted to call a normal Button placed on the WebDynpro View and the close script was saved in the km content in portal.
    We solved it with an own project in NWDS including the html Files.
    Follow the link and you find our solution. Hope it helps.
    Re: Portal navigation problem

  • Save and Close button issue in CRM 2013 for Activity Type Appointment

    Hi All,
    Have come across a strange behavior in CRM 2013 and would like  to be sure that it really is an issue which others have encountered too.
    Open a Case record, and click on Activity navigation link to see the Open Activity Associated View. Then try creating an Activity of type Meeting and click on
    Save & Close button (not just Save). When you refresh the view, the activity might show up. But repeat the same steps and create another Activity of Type Meeting and this activity will not show up. It doesnt show up even in the All Activities
    view. Seems like the activity does not get created when using Save and Close button.
    This behavior is replicated even on online 30 day trial version. Any inputs?
    Regards,
    Yogesh

    The problem only occurs when your appointment times clash.   "Save and close" just throws the appointment away.  "Save" tells you about clash (or perhaps it's just unavailability) and allows you to ignore and continue with the
    save.

  • Itunes has encountered a problem and needs to close.. please help!

    i used to have the old itunes when i got this message saying "Itunes has encountered a problem and needs to close" and it just wouldn't open! so i tried installing the new itunes and it stil gave the same message! ive done a system update on a date when it did work..and still nothing happened!!!
    ive tried uninstalling itunes, reinstalling it, that msconfig thing..and i just don't know what else i can do?? nothing seems to work. has anyone else had this problem???...if so please can u help me solve this problem!!!
    it would be greatly appreciated!

    hi i have been having the same problem with the same error message, when itunes trys to open and i have tried msconfig, allowing it in my firewall, uninstalling and reinstalling, and restoring my computer, virus scanning, ensuring that windows is up to date, and nothing has worked.
    itunes and qttask are not open in the task manager!!!
    also quicktime will not open and is also giving me the same error message "QuickTime Player has encountered a problem and needs to close. We are sorry for the inconvenience."
    I sent the error report and got told that apple haven't come up with a solution for the problem ..... *how helpful*
    when uninstalling itunes i have just realised that it was not also uninstalling quicktime, so i tried to uninstall quicktime and got the fllowing message
    "unhandled exception
    error number:0x80040707
    description: DLL function call crashed: QTInstallcode.QuickTimeUnInstallProc
    setup will now terminate"
    ???? what do i do ????

  • Blank composition, close button malfunctions... help

    I made a blank composition, applied close button option, the button stays on page after rolling my mouse over the close button, then the close button stays on page... help

    Thank you for pointing that out Stephen.
    I am able to replicate that in case where the Hide Target is set to "On Rollout" or "On Rollout of Trigger and Target".
    However, if you are using one of those options for Hide Target setting, I wonder why you need the close button (could you elaborate on your specific requirement so I may help better?).
    Cheers,
    Vikas

  • I Tunes5 iTunes has encountered a problem and needs to close

    I can't get my iTunes 5.0.1 to work
    I tried everything... but i still can't get it to work..
    i'm so angry...now... i use NIS 2005..
    and i referred to all other replies listed on the content..
    somebody please...help me....
    I installed and deleted like thousand times...
    somehow it worked.. once....
    but,after i quit and ran program again it wouldn't work....
    somebody pleeeeeeeeeease help me~~

    iTunes has encountered a problem and needs to close
    hi Peter!
    the first thing i check for with that message is a broken quicktime. see:
    b noir, "Windows: Install and Launching of iTunes 5" #1, 02:52pm Oct 3, 2005 CDT
    keep us posted.
    love, b

  • Adobe Photo Downloader has encountered a problem and needs to close. We are sorry for the inconvenience.  Error Code: c0000005  Address: 76f73ac3     I clicked on the OK button and the downloader closed.     I then tried to download from the organizer. I

    Photoshop Elements 12
    Adobe Photo Downloader has encountered a problem and needs to close. We are sorry for the inconvenience.
    Error Code: c0000005
    Address: 75e32f71
    I clicked on the OK button and the downloader closed.
    I did a search on this error code (c0000005) and there seems to be a workaround but no solutions, why is this? I ask that because this problem seems to be years and years old, going back to at least 2005 (do the math that is 10 years).
    I don't even have the Camera hooked up and I get this error on download.  I redownloaded everything and reinstalled.  I allso saw the AVI issues reported with this proble so i updated Quicktime though without the camera being hooked up when I get this error I didn't expect that to work.  I tried support and they wouldn't help because I bought it in March this year.  Pretty frustrating as I have re-purchased Elements about every 2 years.  I think I might need a new CODEC?   I had this problem on an Earlier version And I seem to remember that being the Fix but this may be something completely different

    I finally found that it was missing a picture so the Catalog was "corrupted".  I just deleted the picture and it started working.
    I hate Adobe and their total lack of support - thanks for nothing Adobe .  Also get this - they offered me to upgrade to 13.0 ( My 12.0 is only 6 months old  but they still don't support it on errors.  Only install errors!
    I have upgrade and repurchase this product 4 times now.  I will find something else next time!

  • Im trying to install adobe flash player and it says i need to close firefox to continue i have and it still says its not closed

    Im installing adobe flash player and its telling me to close mozilla firefox to continue. i exited off the internet but it still says i need to close it

    Download and installation are two separate steps. The Adobe Flash '''installation''' procedure requires that Firefox be closed before installing Flash.
    orange Firefox button > '''''Exit''''' or File > Exit to close Firefox. Then wait a minute or so before starting to install Flash.

  • I am using a Microsoft Natural keyboard and when i use the close button on Ver. 5.0 or newer it closes the whole screen not just the active tab is there a fix for this

    I am using a Microsoft Natural 4000 Keyboard
    IF I update to Mozila 5.0 when i use the close button it shuts down the whole browser nut just the active tab
    Is there a workaround for this because I like the close button feature

    Could you try disabling graphics hardware acceleration? (I'm having trouble determining from your "More system information" whether it's enabled or disabled.) Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You usually need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    orange Firefox button ''or'' classic Tools menu > Options > Advanced
    On the "General" mini-tab, uncheck the box for "Use hardware acceleration when available"
    If you restart Firefox, is the issue resolved?

  • Accessing Close button in TitleWindow

    Hi all,
    I have a situation where I'm adding buttons to a TitleWindow
    chrome. They co-exist with the close button provided by the panel.
    I create classes for my button images and then I size the buttons
    to fit the image.
    I also set the styles for the panel-provided close button
    with classes. My goal was to have all the buttons look & feel
    the same.
    Excerpt from application mxmxl ...
    <mx:Style>
    TitleWindow {
    backgroundColor: #333333;
    closeButtonDisabledSkin: Embed("assets/close.png");
    closeButtonDownSkin: Embed("assets/closeDown.png");
    closeButtonOverSkin: Embed("assets/closeDown.png");
    closeButtonUpSkin: Embed("assets/closeUp.png");
    </mx:Style>
    <v:ResizeWindow id="testResizeWindow"
    height="50%"
    width="50%"
    title="Resize Window"
    useWindowButtons="true"
    status=""
    showCloseButton="true"
    restoreWindow="this.currentState=''"
    maximizeWindow="this.currentState='maximized'"
    minimizeWindow="this.currentState='minimized'"
    close="popUp('Close button clicked')">
    </v:ResizeWindow>
    Excerpt from my ResizeWindow class ...
    override protected function createChildren():void{
    super.createChildren();
    if(useWindowButtons){
    if(btnMinimize == null){
    btnMinimize = new Button();
    var btnMinimizeImageObj:BitmapAsset = new
    btnMinimizeUpSkin() as BitmapAsset;
    btnMinimize.width = btnMinimizeImageObj.width;
    btnMinimize.height = btnMinimizeImageObj.height;
    btnMinimize.setStyle("upSkin", btnMinimizeUpSkin);
    btnMinimize.setStyle("overSkin", btnMinimizeDownSkin);
    btnMinimize.setStyle("downSkin", btnMinimizeDownSkin);
    btnMinimize.addEventListener(MouseEvent.CLICK,
    minimizeHandler);
    btnMinimize.focusEnabled=false;
    btnMinimize.visible=true;
    rawChildren.addChild(btnMinimize);
    Questions:
    1) For the buttons I add (e.g. btnMinimize) ... if I don't
    explicitly set the width and height, they default to 0 and button
    is invisible. Button class says it should size in accordance with
    the image. Is this normal behavior?
    2) Along the lines of #1 above, if I just create btnMinimize
    and give it a text label (no image), the button sizes to a width
    and height of 0. I have to set the width and height for it to
    appear? Is this normal behavior?
    3) I can't include a screen clip here but the close button
    succesfully uses the images I provide but it is larger than the
    other buttons (and the image is distorted). Can I set the height
    and width of the close button to match the image I'm providing (or
    conversely can I get the height and width of the close button so I
    can size my buttons the same)?
    Spent a few days and I'm getting nowhere ...
    thx in advance for any help ...

    Hi Laxmi,
    User has no control on OVS window.You can't  add your custom button on OVS window.In OVS Listener implement the three life cycle methods  i)onQuery ii) applyResult and  iii) applyInputValues which are predefine.
    Regards,
    Mithu

  • Does iTunes match need to locate the actual files or just see its record in your library database? I am currently traveling in US and I have US and Australian iTunes accounts. But all my music files are on a hard drive in Australia.

    Does iTunes match need to locate the actual files or just see its record in your library database? I am currently traveling in US and I have US and Australian iTunes accounts. But all my music files are on a hard drive in Australia. Can I start using itunes music match while I am travelling without the actual music files attached to my itunes?

    In your situation I strongly recommend you read over that KB article. The international iTunes Stores are not cross-compatible.
    My understanding of how it would work is that when activating iTunes Match on your US Store account, any songs you have in your iTunes Library that were purchased from the AUS Store account will NOT be matched. As I understand it, those files will be uploaded (which means you need the files on a local HDD). I also do not think it is possible to have iTunes Match active on more than one store ID on the same computer. But since iTunes Match is not available internationally yet, that point is moot for the moment.
    To be honest you might want to wait until the service is available internationally so you can guage how will it will serve you.

  • When i turn on itunes, it crashes automatically with the error message saying "itunes has encountered a problem and needs to close." I've tried reinstalling itunes but its the same. CAN SOMEONE PLEASE HELP!!!

    when i turn on itunes, it crashes automatically with the error message saying "itunes has encountered a problem and needs to close." I've tried reinstalling itunes but its the same. CAN SOMEONE PLEASE HELP!!!

    Try:
    iOS: If you can't back up or restore from a backup in iTunes

  • I have just opened my brand new Macbook Pro and I'm a first time mac user. I have tried to download flash to enable me to watch you tube clips, but on trying to download it, it says I need to close Safari but after doing so, it still won't respond.

    I have just opened my brand new Macbook Pro and I'm a first time mac user. I have tried to download flash to enable me to watch youtube clips, but on trying to download it, it says I need to close Safari but after doing so, it still won't respond. Any tips? Help?

    Actually you need to quit Safari which is different from closing.  With Safari open go the menu bar for Safari/Quit Safari. 
    Mac 101:  Get Started Using A Mac 

Maybe you are looking for

  • Satellite U920T - dropping wireless connection

    My Satellite U920T seems to sporadically drop its wireless connection and reverts to 'limited' connection which provides no internet access. This is the case on both my home and work wireless networks. Can anyone offer any advice please? Thank you

  • Importing video footage

    I have a Canon HF R300 and have about 2 hours of footage I'd like to import. What is the best and fastest way for me to do this? I don't need it to be high quality, as I'm putting it on dropbox for others to download. Thank you!

  • My serial number cannot be used to use my warranty.How can i service my iPhone 5s?

    My phone has a lot of dents but i cannot service it because my warranty's serial number cannot be used.How?

  • Itunes can not back up iphone.

    I have a iphone 3GS with 4.2.1 IOS, my itunes 10.l keeps responding with an error message durning sync. "itunes cannot backup iphone error occurred. " What can I do to resolve this? Thank you.

  • Gr-based-IV flag not changable by SRM buyer

    Hi, We are on SRM 7, ECS. Our vendor masters in ECC do not have GR-based-IV flag ticked. When we create a SRM PO, the GR-based-IV is not ticket by default. The following are the default status of the 3 indicators in SRM PO by default: GR indicator: T