We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How do I detect the closure of a TabbedGroupMDIManager form?

Thread ID:

Created:

Updated:

Platform:

Replies:

12218 Mar 24,2004 03:49 AM Jun 8,2004 08:41 AM Windows Forms 6
loading
Tags: Tools
Derek Stafford
Asked On March 24, 2004 03:49 AM

What do I need to do in order to capture the closing of a form in a TabbedGroupMDIManager?

Administrator [Syncfusion]
Replied On March 24, 2004 04:42 PM

Hi Ftoomsh, You could handle the MDI child form''s Closing event for this purpose. Please refer to the sample attached that show this. Let me know if this meets your requirements. Regards, Guru Patwal Syncfusion, Inc.

Derek Stafford
Replied On March 25, 2004 04:07 AM

Guru, Thanks, but I suppose what I was really asking was whether the TabbedGroupMDIManager raises an event when one of its child windows is closed/removed. I haven''t found anything in the Help that suggests this. ftoomsh

Administrator [Syncfusion]
Replied On March 25, 2004 06:37 PM

Hi Ftoomsh, Presently, the TabbedMDIManager does not fire any event in response to any of its child forms being closed. I have consulted the development team in this regard, and will update as soon as possible. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On March 26, 2004 08:26 AM

Hi Ftoomsh, We will consider this as a feature request. Could you please provide us more information on the usage scenario for this event ? A better perspective will help us decide whether to fire events before and/or after closing/removing and also suggest workarounds if possible. You might also want to take a look at our TabbedGroupedMDIManager control. We appreciate your feedback very much. Regards, Guru Patwal Syncfusion, Inc.

Mark Atkinson
Replied On June 3, 2004 04:30 PM

I would also like to know how to "override" the closing of a form in the TabbedMDIGroupManager so that I can close the entire TabbedGroup (rather than a single form). Speaking of which, I can''t seem to remove a TabbedGroup. Doing something like: tabbedMDIGroupManager.TabbedGroups.RemoveAt(index); ...doesn''t seem to change the view. I don''t want to dispose of all the forms in the group, I just want the TabbedGroup to be removed from the list. I''m sure I can figure this out in time but any help would be appreciated.

Administrator [Syncfusion]
Replied On June 8, 2004 08:41 AM

Hi Mark, Follow the steps below for this purpose : 1. Handle the Closing event for each of the child forms 2. Get the TabHost associated with that MDI child form 3. Get the associated MDITabPanel from the TabHost 4. Each of the TabPageAdvs in the MDITabPanel contain the respective MDI child form within their Tag object. Access the MDI child form associated with each MDI child form''s Tag and close it. Refer to the code below which shows how this can be done : private void MdiChildFormClosed (object sender, CancelEventArgs arg) { // to ensure that the child form // closing event does not get called recursively if (flag==0) { // get the MDI child form closed Form2 form = sender as Form2; // check for the TabGroup in which it is present foreach(TabPageAdv page in this.tabbedGroupedMdiManager.GetTabHostFromForm(form).MDITabPanel.TabPages) { // the tabpage''s Tag stores the MDI form associated with it Form2 temp = page.Tag as Form2; if (form == temp) { flag=1; this.CloseAllForms(this.tabbedGroupedMdiManager.GetTabHostFromForm(form).MDITabPanel); break; } } } } private void CloseAllForms(MDITabPanel mdiTabpanel) { foreach(TabPageAdv page in mdiTabpanel.TabPages) { ((Form2)page.Tag).Close(); } } The complete sample illustrating this is attached here. Thanks for considering Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;