Docking Manager showCaption = false, Dock Tabs are not visible

I have a Docking manager , on a form, using two usercontrols. I need to hide the caption bar and have Dock Tabs aligned to the top, but when showcaption=false, the tabs are cut off and not visible. Is there a work around for this?

This is reproducable by using the windowFill sample project. version 5

3 Replies

MU Murugan Syncfusion Team May 11, 2007 09:30 PM UTC

Hi Peter,

This issue could be resolved by setting the DockTabControl.Location manually. When ShowCaption is set to false, we have to set the Location property to (1, 1 ) manually.

[Code]
private DockTabControl setTabAlign()
{

DockHost dh = this.checkedListBox1.Parent as DockHost;
DockHostController dhc = dh.InternalController as DockHostController;
DockTabController dtc = dhc.ParentController as DockTabController;
DockTabControl dtab = dtc.TabControl as DockTabControl;
dtab.Location = new Point(1, 1);

return dtab;
}

private void dockingManager1_DockStateChanged(object sender, DockStateChangeEventArgs arg)
{
DockHost dh = this.dockingManager1.ActiveControl.Parent as DockHost;
DockHostController dhc = dh.InternalController as DockHostController;
DockTabController dtc = dhc.ParentController as DockTabController;
if (dtc != null)
{
DockTabControl dtab = dtc.TabControl as DockTabControl;
dtab.Location = new Point(1, 1);
dtab.SelectedIndexChanged -= new EventHandler(dtab_SelectedIndexChanged);
dtab.SelectedIndexChanged += new EventHandler(dtab_SelectedIndexChanged);
}

}

private void dockingManager1_NewDockStateEndLoad(object sender, EventArgs e)
{
DockTabControl dtab = setTabAlign();
dtab.SelectedIndexChanged += new EventHandler(dtab_SelectedIndexChanged);
}

void dtab_SelectedIndexChanged(object sender, EventArgs e)
{
setTabAlign();
}

[Sample]
http://websamples.syncfusion.com/samples/Tools.Windows/F60806/Main.htm

Please refer to this and let me know if it helps you.

Thank you for using Syncfusion products.

Regards,
Murugan P.S


PC Peter Capiral May 11, 2007 11:46 PM UTC

I was able to implement your example, but when I add more than 2 tab controls, the tabs disappear. My real goal is to dynamically dock controls only in a tabbed style, but If there is only one docked control i do not want the ability to undock the control, the conclusion I came up with is to not show the caption bar. Is their a better way of doing this? I apologize for the multiple issues, thank you for your quick response and help on this matter. I will continue to investigate this issue. Any help on these issues would most appreciated


MU Murugan Syncfusion Team May 14, 2007 06:45 PM UTC

Hi Peter,

We regret for the inconvenience caused. We could see the issue as you mentioned in v5.1. Could you please create a DirectTrac incident with subject line "Docking Manager showCaption = false, Dock Tabs are not visible - F60806". We will send you the bug fix details through our DirectTrac system.

Thanks for your patience.

Regards,
Murugan P.S

Loader.
Up arrow icon