DataGridViewColumnHeaderCell.GetInheritedStyle メソッド

定義

セルに適用されるスタイルを取得します。

public:
 override System::Windows::Forms::DataGridViewCellStyle ^ GetInheritedStyle(System::Windows::Forms::DataGridViewCellStyle ^ inheritedCellStyle, int rowIndex, bool includeColors);
public override System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle inheritedCellStyle, int rowIndex, bool includeColors);
public override System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle? inheritedCellStyle, int rowIndex, bool includeColors);
override this.GetInheritedStyle : System.Windows.Forms.DataGridViewCellStyle * int * bool -> System.Windows.Forms.DataGridViewCellStyle
Public Overrides Function GetInheritedStyle (inheritedCellStyle As DataGridViewCellStyle, rowIndex As Integer, includeColors As Boolean) As DataGridViewCellStyle

パラメーター

inheritedCellStyle
DataGridViewCellStyle

継承されたセル スタイルで設定する DataGridViewCellStyle

rowIndex
Int32

セルの親行のインデックス。

includeColors
Boolean

true 返されたセル スタイルに継承された色を含める場合。それ以外の場合は false

返品

セルの親行、列、およびDataGridViewCellStyleから継承されたセルのスタイル設定を含むDataGridView

例外

rowIndex は -1 ではありません。

注釈

このメソッドは、DataGridViewCellStyleDataGridViewCellStyleおよびColumnHeadersDefaultCellStyleプロパティによって返されるDefaultCellStyle オブジェクトから設定を継承するDataGridViewを返します。 詳細については、「Windows フォーム DataGridView コントロールの セル のスタイル」を参照してください。

適用対象

こちらもご覧ください