Infragistics Home

Infragistics Forums

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

How to close all the tabs under TabbedMDI??

Last post 07-11-2008 9:57 by [Infragistics] Sung Kim. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-27-2008 10:51

    • somay
    • Top 75 Contributor
    • Joined on 12-10-2007
    • Points 990

    How to close all the tabs under TabbedMDI??

    I am trying to find out a way to close all the open MDI tabs in a single click .i got one property ActiveTab but i am unable to find whole tab collection. Is there anyway to close all the tabs under TabbedMDi without iterating each tab's close property? Also if someone knows about how to get tab collection from TabbedMDI. Pleae share it?

     

    Thanks--

    • Post Points: 20
  • 06-27-2008 15:21 In reply to

    Re: How to close all the tabs under TabbedMDI??

    The tabs reside in the tab groups which is off the manager.

    You can loop through the ultraTabbedMdiManager1.TabGroups and access the MdiTab items off the Tabs collection.

    so

    ultraTabbedMdiManager1.TabGroups[0].Tabs[0] would be the first tab in the first group.

    • Post Points: 20
  • 07-10-2008 15:51 In reply to

    Re: How to close all the tabs under TabbedMDI??

    Hi,

    maybe what he is trying to do (as I am) is to add a "Close all" option to the context menu in the tab. I obviously know that I can loop through the tabs collection, but I would like to add a standard look and feel to my app, and most of the professional apps I use that use tabs have the "Close all" or "Close all but this" options.

    Any clue on how to do this?

    • Post Points: 20
  • 07-11-2008 9:57 In reply to

    Re: How to close all the tabs under TabbedMDI??

    You will have to handle the InitializeContextMenu event and add your own items to the context menu.  There is some code in the documentation for this event:

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Win.UltraWinTabbedMdi.v8.2~Infragistics.Win.UltraWinTabbedMdi.UltraTabbedMdiManager~InitializeContextMenu_EV.html

     You would still have to loop through all the mdi tabs and close them in the method that gets called by your custom menu item, as I do not believe there is no "closeall" method.

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