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.

Tabbed controls siblings

Thread ID:

Created:

Updated:

Platform:

Replies:

2747 Feb 12,2003 10:47 AM Feb 13,2003 08:23 AM Windows Forms 1
loading
Tags: Tools
Bruno Vais
Asked On February 12, 2003 10:47 AM

Is there a way to find out if a control is tabbed and which are its siblings?

Prakash S [Syncfusion]
Replied On February 13, 2003 08:23 AM

Hi Bruno, There isn't an API to determine the tabbed state, but you can do so by directly accessing some of the internal docking windows classes. The following code tests whether the dockable control 'listBox1' is in a tabbed dock group, and if so, lists out all controls in that group. Trace.Assert(this.dockingManager1.GetEnableDocking(this.listBox2)); Syncfusion.Windows.Forms.Tools.DockHost dhost = this.listBox2.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) { Trace.WriteLine("Control is docked as a tab"); Syncfusion.Windows.Forms.Tools.DockTabControl docktab = (dhc.ParentController as Syncfusion.Windows.Forms.Tools.DockTabController).TabControl; foreach(DockTabPage tabpage in docktab.TabPages) { Control siblingcontrol = tabpage.dhcClient.HostControl.Controls[0]; Trace.WriteLine(siblingcontrol.Name); } } Prakash Syncfusion

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.

;