'Declaration Public Event TabDisplaying As MdiTabEventHandler
public event MdiTabEventHandler TabDisplaying
The event handler receives an argument of type MdiTabEventArgs containing data related to this event. The following MdiTabEventArgs properties provide information specific to this event.
MdiTab objects associated with non-visible forms are stored in the HiddenTabs collection and are not associated with a particular MdiTabGroup. When the associated Form is made visible, the tab is removed from the HiddenTabs and added to a MdiTabGroup. The TabDisplaying event is invoked when the tab has been added to a MdiTabGroup but before the display has been updated.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabbedMdi Private Sub ultraTabbedMdiManager1_TabDisplaying(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.MdiTabEventArgs) Handles ultraTabbedMdiManager1.TabDisplaying ' The 'TabDisplaying' event is invoked when a tab in the ' HiddenTabs collection is about to be moved to an ' MdiTabGroup that will display the tab but before the ' display has been updated. ' ' The 'Tab' parameter returns the tab being displayed. ' ' when we are going to show our edit forms, have them all ' in the one tab group If TypeOf e.Tab.Form Is EditForm Then ' if the "Edit" group exists, then move the tab to that group If e.Tab.Manager.TabGroups.Exists("Edit") Then e.Tab.MoveToGroup(e.Tab.Manager.TabGroups("Edit")) Else ' put it in a new tab group ' the method will return the new tab group Dim tabGroup As MdiTabGroup = e.Tab.MoveToNewGroup(MdiTabGroupPosition.Last) ' initialize the key of the tab group tabGroup.Key = "Edit" ' prevent tabs being dragged into this group ' from other groups tabGroup.Settings.AllowDrop = DefaultableBoolean.False End If End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabbedMdi; private void ultraTabbedMdiManager1_TabDisplaying(object sender, Infragistics.Win.UltraWinTabbedMdi.MdiTabEventArgs e) { // The 'TabDisplaying' event is invoked when a tab in the // HiddenTabs collection is about to be moved to an // MdiTabGroup that will display the tab but before the // display has been updated. // // The 'Tab' parameter returns the tab being displayed. // // when we are going to show our edit forms, have them all // in the one tab group if (e.Tab.Form is EditForm) { // if the "Edit" group exists, then move the tab to that group if (e.Tab.Manager.TabGroups.Exists("Edit")) e.Tab.MoveToGroup(e.Tab.Manager.TabGroups["Edit"]); else { // put it in a new tab group // the method will return the new tab group MdiTabGroup tabGroup = e.Tab.MoveToNewGroup(MdiTabGroupPosition.Last); // initialize the key of the tab group tabGroup.Key = "Edit"; // prevent tabs being dragged into this group // from other groups tabGroup.Settings.AllowDrop = DefaultableBoolean.False; } } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2