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.

Active tab problem with after serialization

Thread ID:

Created:

Updated:

Platform:

Replies:

4255 May 5,2003 11:42 AM Jul 19,2004 03:28 PM Windows Forms 8
loading
Tags: Tools
Rachel York
Asked On May 5, 2003 11:42 AM

I am having a problem with serialization and deserialization using both the docking manager serialization wrapper and the tag groups state info objects. I have several tabbed items and I use the serialization call : TabGroupsStateInfo MDIInfo = new TabGroupsStateInfo(MDIManager); Then when I go to deserialize I use: MDIManager.ApplyDeserializedState(MDIInfo); However the tab that was had active before the serialization is not the active tab after serialization. Any ideas?? I am also having the same problem using docking manager's serialization as follows: DockingMgrSerializationWrapper dockingInfo = new DockingMgrSerializationWrapper(dockingManager); dockingManager.ApplyDeserializedState(dockingInfo); Thanks in advance! Rachel

Ramesh Praveen [Syncfusion]
Replied On May 6, 2003 07:49 AM

Rachel, In the tabbed mdi serialization logic we do not serialize any state that is not a logical part of the tabbed mdi UI. The active child is such a state that is not part of the tabbed mdi UI state and hence we don't serialize it. You will have to include this state yourself in your serialization logic. You will hear back from Prakash soon on the docking serialization issue. Regards, Praveen

Rachel York
Replied On May 22, 2003 10:38 AM

Praveen, Thanks for your advice. I still have not found anything on the docking serialization active tab problem as described in my first post. Any suggestions? Rachel

Prakash S [Syncfusion]
Replied On May 27, 2003 10:06 AM

Hi Rachel, The DockingManager, upon loading a persisted dockstate, will always activate the last tab in the tabbed dock group. While ideally it should attempt to persist and restore the active tab, the current version of the docking framework does not do this. We have a QA report on the problem and will try to address this issue as soon as possible. Prakash Syncfusion, Inc

Rachel York
Replied On June 2, 2003 02:02 PM

Hi, Do you know any workaround for the active tab serialization problem with the docking manager. I have managed save the active tab associated with the tab manager and serialized the selected tab information from each tab group. However, I cannot find a way around this problem with the docking manager. Is there a workaround I'm missing?? Thanks! Rachel

Prakash S [Syncfusion]
Replied On June 9, 2003 10:25 AM

Hi Rachel, You can use a similar approach to persist a list containing the Control.Name property of the active docking window in each of the tabbed dock groups that may exist when your application state is being persisted. The following code should let you get the list of the active tabs // The alActiveTabs list will be populated with the Name values of the active docking window // in each of the tab groups in the layout ArrayList alActiveTabs = new ArrayList(); IEnumerator controls = this.dockingManager1.Controls; while(controls.MoveNext()) { Control dockingwnd = controls.Current as Control; // If the control is a part of a tabbed dock group, then get the // active tab in the group and add it's Name to the list Syncfusion.Windows.Forms.Tools.DockHost dhost = dockingwnd.Parent as Syncfusion.Windows.Forms.Tools.DockHost; Syncfusion.Windows.Forms.Tools.DockHostController dhc = dhost.InternalController as Syncfusion.Windows.Forms.Tools.DockHostController; if(dhc.ParentController is Syncfusion.Windows.Forms.Tools.DockTabController) { Syncfusion.Windows.Forms.Tools.DockTabController dtc = dhc.ParentController as Syncfusion.Windows.Forms.Tools.DockTabController; Control activecontrol = dtc.HostControl.Controls[0]; Trace.WriteLine(String.Concat(activecontrol.Name, " is the active tab in the dock group.")); if(alActiveTabs.Contains(activecontrol.Name) == false) alActiveTabs.Add(activecontrol.Name); } } After depersistence just run through this list and invoke the DockingManager.ActivateControl(Control) method on these controls to activate the particular tab. Prakash Syncfusion

John Schroedl
Replied On July 19, 2004 07:44 AM

>The following code should let you get the list of the active tabs > >// The alActiveTabs list will be populated with the Name values of the active docking window >// in each of the tab groups in the layout >ArrayList alActiveTabs = new ArrayList(); >IEnumerator controls = this.dockingManager1.Controls; >while(controls.MoveNext()) >{ > Control dockingwnd = controls.Current as Control; > // If the control is a part of a tabbed dock group, then get the > // active tab in the group and add it''s Name to the list > Syncfusion.Windows.Forms.Tools.DockHost dhost = dockingwnd.Parent as Syncfusion.Windows.Forms.Tools.DockHost; > Syncfusion.Windows.Forms.Tools.DockHostController dhc = dhost.InternalController as Syncfusion.Windows.Forms.Tools.DockHostController; > if(dhc.ParentController is Syncfusion.Windows.Forms.Tools.DockTabController) > { > Syncfusion.Windows.Forms.Tools.DockTabController dtc = dhc.ParentController as Syncfusion.Windows.Forms.Tools.DockTabController; > Control activecontrol = dtc.HostControl.Controls[0]; > Trace.WriteLine(String.Concat(activecontrol.Name, " is the active tab in the dock group.")); > if(alActiveTabs.Contains(activecontrol.Name) == false) > alActiveTabs.Add(activecontrol.Name); > } >} > >After depersistence just run through this list and invoke the DockingManager.ActivateControl(Control) method on these controls to activate the particular tab. > >Prakash >Syncfusion Hi Prakash, I''ve tried to apply this technique to our code to persist the active tab. But, in the loop dhc.ParentController shows up as type Syncfusion.Windows.Forms.Tools.SizingController for my application. Expanding the object in the debugger I see dhc.ParentController.ChildCount = 2 (I have 2 tabs in this docking area). But, the cast to DockTabController fails. Any advice on extracting the active tab from a SizingController? John

John Schroedl
Replied On July 19, 2004 09:52 AM

No need to reply here unless you feel like it. I think this warrants a Direc-Trac issue so I will open one of those.

Administrator [Syncfusion]
Replied On July 19, 2004 03:28 PM

Hi John, Thanks for opening a DirectTrac incident 12480 in this regard. I will update you there from now on. We appreciate your cooperation, and thanks for choosing 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.

;