Dock Tab Document

3 posts, 0 answers
  1. Claude IMBERT
    Claude IMBERT avatar
    68 posts
    Member since:
    Oct 2006

    Posted 23 Apr 2007 Link to this post

    Hello,

    I would like catch the close event when I click on the close button of tab document?

    Thank's a lot

    Lionel
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 23 Apr 2007 Link to this post

    Hi Lionel,

    This issue is in our TODO list. The feature will be available for Q1 2007 SP1 release (some time next month).
     

    Regards,
    Julian Benkov
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. KMBah
    KMBah avatar
    16 posts
    Member since:
    Jun 2007

    Posted 07 Aug 2007 Link to this post

    Not sure if you got this working for you or not, but here's how I'm doing it in my application.

    dmMain is my docking manager on frmMain. frmView is a mdichild of frmMain. dmMain takes control of frmView with the new AutoDetectMdiChildForms option.

    public frmMain()  
    {  
        InitializeComponent();  
        this.dmMain.DockingStateChanging += new DockingChangingEventHandler(dmMain_DockingStateChanging);  
    }  
     
     
    private void dmMain_DockingStateChanging(object sender, DockingChangingEventArgs e)  
    {  
        if (e.DockObject is DocumentPane)  
        {  
            if (e.PreviousDockableState == DockState.TabbedDocument  
                && e.DockableState == DockState.Default)  
            {  
                DocumentPane dp = e.DockObject as DocumentPane;  
                frmView frm = dp.Controls[0] as frmView;  
     
                frm.Close();  
            }  
        }  
Back to Top