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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tabbed controls siblings

Thread ID:





2747 Feb 12,2003 03:47 PM UTC Feb 13,2003 01:23 PM UTC WinForms 1
Tags: Tools
Bruno Vais
Asked On February 12, 2003 03:47 PM UTC

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 01:23 PM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon