DataGridViewRow.AdjustRowHeaderBorderStyle メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した条件に従って、入力行ヘッダー境界線スタイルを変更します。
public:
virtual System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ AdjustRowHeaderBorderStyle(System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStyleInput, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStylePlaceholder, bool singleVerticalBorderAdded, bool singleHorizontalBorderAdded, bool isFirstDisplayedRow, bool isLastVisibleRow);
public virtual System.Windows.Forms.DataGridViewAdvancedBorderStyle AdjustRowHeaderBorderStyle (System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput, System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceholder, bool singleVerticalBorderAdded, bool singleHorizontalBorderAdded, bool isFirstDisplayedRow, bool isLastVisibleRow);
abstract member AdjustRowHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
override this.AdjustRowHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
Public Overridable Function AdjustRowHeaderBorderStyle (dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, dataGridViewAdvancedBorderStylePlaceholder As DataGridViewAdvancedBorderStyle, singleVerticalBorderAdded As Boolean, singleHorizontalBorderAdded As Boolean, isFirstDisplayedRow As Boolean, isLastVisibleRow As Boolean) As DataGridViewAdvancedBorderStyle
パラメーター
- dataGridViewAdvancedBorderStyleInput
- DataGridViewAdvancedBorderStyle
変更する行ヘッダー境界線スタイルを表す DataGridViewAdvancedBorderStyle。
- dataGridViewAdvancedBorderStylePlaceholder
- DataGridViewAdvancedBorderStyle
行ヘッダー境界線スタイルに対する中間的な変更を格納するために使用される DataGridViewAdvancedBorderStyle。
- singleVerticalBorderAdded
- Boolean
結果に一重線の垂直方向の境界線を追加する場合は true
。それ以外の場合は false
。
- singleHorizontalBorderAdded
- Boolean
結果に一重線の水平方向の境界線を追加する場合は true
。それ以外の場合は false
。
- isFirstDisplayedRow
- Boolean
その行が DataGridView で最初に表示される行の場合は true
。それ以外の場合は false
。
- isLastVisibleRow
- Boolean
その行が、DataGridView プロパティが true
に設定された、Visible の最後の行の場合は true
。それ以外の場合は false
。
戻り値
使用される新しい境界線スタイルを表す DataGridViewAdvancedBorderStyle。
例
次のコード例では、 メソッドをオーバーライド AdjustRowHeaderBorderStyle して行ヘッダー セルの罫線をカスタマイズする方法を示します。 このコード例は、DataGridViewAdvancedBorderStyle クラスのために提供されている大規模な例の一部です。
public override DataGridViewAdvancedBorderStyle AdjustRowHeaderBorderStyle(
DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput,
DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceHolder,
bool singleVerticalBorderAdded,
bool singleHorizontalBorderAdded,
bool isFirstDisplayedRow,
bool isLastDisplayedRow)
{
// Customize the top border of the first row header and the
// right border of all the row headers. Use the input style for
// all other borders.
dataGridViewAdvancedBorderStylePlaceHolder.Top = isFirstDisplayedRow ?
DataGridViewAdvancedCellBorderStyle.InsetDouble :
DataGridViewAdvancedCellBorderStyle.None;
dataGridViewAdvancedBorderStylePlaceHolder.Right =
DataGridViewAdvancedCellBorderStyle.OutsetDouble;
dataGridViewAdvancedBorderStylePlaceHolder.Left =
dataGridViewAdvancedBorderStyleInput.Left;
dataGridViewAdvancedBorderStylePlaceHolder.Bottom =
dataGridViewAdvancedBorderStyleInput.Bottom;
return dataGridViewAdvancedBorderStylePlaceHolder;
}
Public Overrides Function AdjustRowHeaderBorderStyle( _
ByVal dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, _
ByVal dataGridViewAdvancedBorderStylePlaceHolder As DataGridViewAdvancedBorderStyle, _
ByVal singleVerticalBorderAdded As Boolean, _
ByVal singleHorizontalBorderAdded As Boolean, _
ByVal isFirstDisplayedRow As Boolean, _
ByVal isLastDisplayedRow As Boolean) As DataGridViewAdvancedBorderStyle
' Customize the top border of the first row header and the
' right border of all the row headers. Use the input style for
' all other borders.
If isFirstDisplayedRow Then
dataGridViewAdvancedBorderStylePlaceHolder.Top = _
DataGridViewAdvancedCellBorderStyle.InsetDouble
Else
dataGridViewAdvancedBorderStylePlaceHolder.Top = _
DataGridViewAdvancedCellBorderStyle.None
End If
With dataGridViewAdvancedBorderStylePlaceHolder
.Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble
.Left = dataGridViewAdvancedBorderStyleInput.Left
.Bottom = dataGridViewAdvancedBorderStyleInput.Bottom
End With
Return dataGridViewAdvancedBorderStylePlaceHolder
End Function
End Class
注釈
コントロールは DataGridView 、 メソッドを AdjustRowHeaderBorderStyle 内部的に呼び出して、行ヘッダー セルの罫線の外観を決定します。 コントロールは DataGridView 通常、 パラメーターの プロパティの AdvancedRowHeadersBorderStyle 値を dataGridViewAdvancedBorderStyleInput
使用します。
注意 (継承者)
行ヘッダー セルの罫線の外観をカスタマイズする場合は、このメソッドをオーバーライドします。
適用対象
こちらもご覧ください
.NET