Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

What is the TabCloseAction in TabClosing() for?

Last post 05-14-2008 9:46 by gerald_jk. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-14-2008 4:40

    What is the TabCloseAction in TabClosing() for?

    Dear community,

    In the code sample of the help topic about the TabClosing() event is the following code

               if (e.Tab.SettingsResolved.TabCloseAction == MdiTabCloseAction.Close)
               {
                   
    if (e.Tab.Form is
    EditForm)
                   {
                       
    if
    (! ((EditForm)e.Tab.Form).Save() )
                           e.Cancel = true;
                   }
               }

    I wonder what the TabCloseAction is for? Why that comparison with MdiTabCloseAction.Close?

    Best regards, Gerald

    Filed under:
    • Post Points: 20
  • 05-14-2008 9:35 In reply to

    Re: What is the TabCloseAction in TabClosing() for?

    Answer

    On the SettingsResolved, the TabCloseAction can have the values None, Hide, or Close. These indicate what will happen to the Form on the tab when the tab is closed. None indicates the Form and tab will remain open. Hide indicates the Form and tab will be hidden, but can be shown again later. However, Close indicates the Form will be closed, so in the code snippet above, if the Form would be closing, the code asks the user if they want to save the form before closing.

    • Post Points: 50
  • 05-14-2008 9:46 In reply to

    Re: What is the TabCloseAction in TabClosing() for?

    All right. Thanks, Mike.

    Regards, Gerald

    • Post Points: 5
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems