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

How to notify the selected tab changes in WinForms TabbedMDIManager?

Platform: WinForms |
Control: TabbedMDIManager |
Published Date: May 22, 2018 |
Last Revised Date: January 27, 2020 |
.NET Framework: 4.5

Notify the selected tab changes in TabbedMDIManager

In TabbedMDIManager, TabControlAdv has been used internally to display the items in Tabbed structure. SelectedIndexChanged event of TabControlAdv is used to notify the tab selection in TabbedMDIManager. The following code snippet demonstrates the same, 

C#

public partial class Form1 : Form
{
  public Form1()
  {
    InitializeComponent();
    this.tabbedMDIManager1.TabControlAdded += TabbedMDIManager1_TabControlAdded;
  }
  private TabControlAdv tabcontrol = null;
  private void TabbedMDIManager1_TabControlAdded(object sender, Syncfusion.Windows.Forms.Tools.TabbedMDITabControlEventArgs args)
  {
    tabcontrol = args.TabControl;
    tabcontrol.SelectedIndexChanged += Tabcontrol_SelectedIndexChanged;
  }
  private void Tabcontrol_SelectedIndexChanged(object sender, EventArgs e)
  {
    Console.WriteLine(tabcontrol.SelectedTab.Text + "is Selected");
  }
}

VB

Partial Public Class Form1
  Inherits Form
  Public Sub New()
    InitializeComponent()
    AddHandler Me.tabbedMDIManager1.TabControlAdded, AddressOf TabbedMDIManager1_TabControlAdded
  End Sub
  Private tabcontrol As TabControlAdv = Nothing
  Private Sub TabbedMDIManager1_TabControlAdded(ByVal sender As Object, ByVal args As Syncfusion.Windows.Forms.Tools.TabbedMDITabControlEventArgs)
    tabcontrol = args.TabControl
    AddHandler tabcontrol.SelectedIndexChanged, AddressOf Tabcontrol_SelectedIndexChanged
  End Sub
  Private Sub Tabcontrol_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    Console.WriteLine(tabcontrol.SelectedTab.Text + "is Selected")
  End Sub
End Class

Samples:

C#: http://www.syncfusion.com/downloads/support/directtrac/general/ze/CSharp_TabbedMDIManager_Notify_event752758519.zip

VB: http://www.syncfusion.com/downloads/support/directtrac/general/ze/VB_TabbedMDIManager_Notify_event587455476.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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