'宣言 Public Enum MdiTabDropAction Inherits System.Enum
public enum MdiTabDropAction : System.Enum
メンバ | 解説 |
---|---|
ContextMenu | 実行するアクションを指定するためのコンテキストメニューが表示されます。 |
NewHorizontalGroup | タブは新しい水平グループに配置されます。 |
NewVerticalGroup | タブは新しい垂直グループに配置されます。 |
None | アクションは実行されません。マウスが無効な位置で離されたときに発生します。 |
TabGroup | タブは MdiTabGroup に配置されています。 |
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabbedMdi Private Sub ultraTabbedMdiManager1_TabDragOver(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.MdiTabDragOverEventArgs) Handles ultraTabbedMdiManager1.TabDragOver ' The 'TabDragOver' event is invoked during a drag operation ' as the mouse is repositioned. The 'DropAction' indicates ' the action that will be taken if the mouse is released ' at this point. ' Select Case e.DropAction Case MdiTabDropAction.TabGroup ' if the tab came from another tab group ' is attempting to drag it over an edit group, ' then prevent the drop If Not e.TabGroup Is e.Tab.TabGroup AndAlso e.TabGroup.Key = "Edit" Then ' The 'AllowDrop' may be set to false to indicate ' that the specified point is not a valid drop location. e.AllowDrop = False ' The 'DragCursor' may be used to show a specific cursor ' for the 'Point' being processed. e.DragCursor = Cursors.No End If Exit Sub Case MdiTabDropAction.NewHorizontalGroup Case MdiTabDropAction.NewVerticalGroup ' the point must be over a splitter bar ' or near the edge of the mdi client area Exit Sub Case MdiTabDropAction.ContextMenu ' prevent the display of a context menu if ' the mouse is released within the mdi client area e.AllowDrop = False Exit Sub End Select End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabbedMdi; private void ultraTabbedMdiManager1_TabDragOver(object sender, Infragistics.Win.UltraWinTabbedMdi.MdiTabDragOverEventArgs e) { // The 'TabDragOver' event is invoked during a drag operation // as the mouse is repositioned. The 'DropAction' indicates // the action that will be taken if the mouse is released // at this point. // switch(e.DropAction) { case MdiTabDropAction.TabGroup: { // if the tab came from another tab group // is attempting to drag it over an edit group, // then prevent the drop if (e.TabGroup != e.Tab.TabGroup && e.TabGroup.Key == "Edit") { // The 'AllowDrop' may be set to false to indicate // that the specified point is not a valid drop location. e.AllowDrop = false; // The 'DragCursor' may be used to show a specific cursor // for the 'Point' being processed. e.DragCursor = Cursors.No; } break; } case MdiTabDropAction.NewHorizontalGroup: case MdiTabDropAction.NewVerticalGroup: // the point must be over a splitter bar // or near the edge of the mdi client area break; case MdiTabDropAction.ContextMenu: // prevent the display of a context menu if // the mouse is released within the mdi client area e.AllowDrop = false; break; } }