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.

Redrawing the title bar when using the docking manager

Thread ID:

Created:

Updated:

Platform:

Replies:

56816 Feb 21,2007 07:23 AM Mar 1,2007 06:43 PM Windows Forms 4
loading
Tags: GridControl
Edward Khoze
Asked On February 21, 2007 07:23 AM

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

Murugan [Syncfusion]
Replied On February 21, 2007 03:47 PM

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

Edward Khoze
Replied On February 26, 2007 09:17 AM

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

Edward Khoze
Replied On March 1, 2007 04:05 AM

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

Thanks

Ed

Murugan [Syncfusion]
Replied On March 1, 2007 06:43 PM

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

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.

;