Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Private Sub UltraGrid1_BeforeRowRegionSplit(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeRowRegionSplitEventArgs) Handles ultraGrid1.BeforeRowRegionSplit
' 新しいスクロール領域はが 50 ピクセルより小さい場合、
' UltraGrid が分割された領域へスクロールしないようにイベントをキャンセルします
If e.NewRowScrollRegion.Height < 50 Then
e.Cancel = True
' 行のスクロール領域を分割すると、50 ピクセルより小さくなる場合も
' キャンセルします
ElseIf e.OriginalRowScrollRegion.Height - e.NewRowScrollRegion.Height < 50 Then
e.Cancel = True
End If
If e.Cancel Then
MessageBox.Show("You cannot split a row scroll region smaller than 50 pixels.")
End If
End Sub
Private Sub UltraGrid1_BeforeRowRegionSize(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeRowRegionSizeEventArgs) Handles ultraGrid1.BeforeRowRegionSize
' 影響されるスクロール領域が 50 ピクセルより小さくなるサイズ変更がある場合、
' サイズ変更をキャンセルします
If e.Region1.Height < 50 Or e.Region2.Height < 50 Then
e.Cancel = True
MessageBox.Show("You cannot resize a row scroll region smaller than 50 pixels.")
End If
End Sub