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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to find the control which is currently active in tabbed group?


DockTabControl has an event which name is SelectedIndexChanged can give the details about the currently active control in the DockTabbedGroup. DockTabControl has the SelectedTab property which give the current active control in the group.

The following code snippet explain the above concept,


private void dockTabControl_SelectedindexChanging (object sender, EventArgs e)


if(sender is DockTabControl){

DockTabControl tabcontrol = sender as DockTabControl;

string str = (string)tabcontrol.Tag;

//Checks whether the DockTabControl.Tag is left or right.

if(tabcontrol.SelectedTab !=null)

if (str == "left")

Console.WriteLine("Selected Control on the left : " + tabcontrol.SelectedTab.Text);


Console.WriteLine("Selected Control on the right : " + tabcontrol.SelectedTab.Text);





Private Sub dockTabControl_SelectedindexChanging(ByVal sender As Object, ByVal e As EventArgs)

If TypeOf sender Is DockTabControl Then

Dim tabcontrol As DockTabControl = CType(IIf(TypeOf sender Is DockTabControl, sender, Nothing), DockTabControl)

Dim str As String = CStr(tabcontrol.Tag)

'Checks whether the DockTabControl.Tag is left or right.

If Not tabcontrol.SelectedTab is Nothing Then

If str = "left" Then

Console.WriteLine("Selected Control on the left : " & tabcontrol.SelectedTab.Text)


Console.WriteLine("Selected Control on the right : " & tabcontrol.SelectedTab.Text)

End If

End If

End If

End Sub

Article ID: Published Date: Last Revised Date: Platform: Control:
1260 04/30/2011 07/10/2014 WinForms DockingManager
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to 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