RP
Ramesh Praveen
Syncfusion Team
May 6, 2003 11:49 AM UTC
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
RY
Rachel York
May 22, 2003 02:38 PM UTC
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
PS
Prakash S
Syncfusion Team
May 27, 2003 02:06 PM UTC
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
RY
Rachel York
June 2, 2003 06:02 PM UTC
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
PS
Prakash S
Syncfusion Team
June 9, 2003 02:25 PM UTC
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
JS
John Schroedl
July 19, 2004 11:44 AM UTC
>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
JS
John Schroedl
July 19, 2004 01:52 PM UTC
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.
AD
Administrator
Syncfusion Team
July 19, 2004 07:28 PM UTC
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.