Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Private Sub UltraGrid1_BeforeColRegionSplit(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeColRegionSplitEventArgs) Handles ultraGrid1.BeforeColRegionSplit
' 新しいスクロール領域が 100 ピクセルより小さい場合、
' UltraGrid が分割された領域へスクロールしないようにイベントをキャンセルします
If e.NewColScrollRegion.Width < 100 Then
e.Cancel = True
' 列のスクロール領域を分割すると、100 ピクセルより小さくなる場合も
' キャンセルします
ElseIf e.OriginalColScrollRegion.Width - e.NewColScrollRegion.Width < 100 Then
e.Cancel = True
End If
If e.Cancel Then
MessageBox.Show("You cannot split a column scroll region smaller than 100 pixels.")
End If
End Sub
Private Sub UltraGrid1_BeforeColRegionSize(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeColRegionSizeEventArgs) Handles ultraGrid1.BeforeColRegionSize
' 影響されるスクロール領域が 100 ピクセルより小さくなるサイズ変更がある場合、
' サイズ変更をキャンセルします
If e.Region1.Width < 100 Or e.Region2.Width < 100 Then
e.Cancel = True
MessageBox.Show("You cannot resize a column scroll region smaller than 100 pixels.")
End If
End Sub