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. Image for the cookie policy date
close icon

Redrawing the title bar when using the docking manager

Hi guys

Is it possible to change the appearance of the topmost title bar when using the DockingManager, for example to draw a button on it or something. Something similar to maybe a ProvideGraphicsItems event, which we already override to change the color of this title bar.

Thanks in advance

Ed

4 Replies

MU Murugan Syncfusion Team February 21, 2007 08:47 PM UTC

Hi Ed,

Thank you for using Syncfusion products.

By customizing DockingManager, DockHost and Captionpainter classes we could achieve this. Herewith I have attached the sample. Please refer the sample and let me know if it helps you.

Custom button draw

Regards,
Murugan P.S


EK Edward Khoze February 26, 2007 02:17 PM UTC

Hi Murugan

Thank you for your prompt reply. I'm currently faced with another couple of issues:

Is there any way to determine on which control you are painting on (in case i've got several controls attached to the DockingManager) inside the PaintCaption method, so I can draw on some, but not on others?

And another question: Also when using the DockingManager, is there any way, when the controls are on top of each other (tabbed), to actually make those tabs invisible?

Cheers

Ed


EK Edward Khoze March 1, 2007 09:05 AM UTC

Anyone? I really need the answers to those questions, cos this piece of work I'm doing now is quite urgent.

Thanks

Ed


MU Murugan Syncfusion Team March 1, 2007 11:43 PM UTC

Hi Ed,

We are really sorry for the delay in responding. In PaintCaption method using this.dhcOwner.HostControl.Controls[0] we could get the current painted control. To hide the tabs in Docking please refer to the following code snippet

private void dockingManager1_DockStateChanged(object sender, Syncfusion.Windows.Forms.Tools.DockStateChangeEventArgs arg)
{
foreach ( Control ctrl in arg.Controls )
{
if ( this.dockingManager1.IsTabbed( ctrl ) )
{
Syncfusion.Windows.Forms.Tools.DockHost dhost = ctrl.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.DockTabControl docktab = (dhc.ParentController as
Syncfusion.Windows.Forms.Tools.DockTabController).TabControl;
docktab.Visible = false;
}
}
}

}

and let me know if it helps you.

Thanks,
Murugan P.S

Loader.
Live Chat Icon For mobile
Up arrow icon