DataGridColumnStyle.CreateHeaderAccessibleObject 方法

定义

获取列的 AccessibleObject

protected:
 virtual System::Windows::Forms::AccessibleObject ^ CreateHeaderAccessibleObject();
protected virtual System.Windows.Forms.AccessibleObject CreateHeaderAccessibleObject ();
abstract member CreateHeaderAccessibleObject : unit -> System.Windows.Forms.AccessibleObject
override this.CreateHeaderAccessibleObject : unit -> System.Windows.Forms.AccessibleObject
Protected Overridable Function CreateHeaderAccessibleObject () As AccessibleObject

返回

用于列的 AccessibleObject

示例

下面的代码示例获取 System.Windows.Forms.DataGridDataGridColumnStyle

private:
   void GetDataGrid( DataGridTableStyle^ thisColumn )
   {
      DataGrid^ myDataGrid;
      
      // Get the DataGrid of the column.
      myDataGrid = thisColumn->DataGrid;
   }
private void GetDataGrid(DataGridTableStyle thisColumn){
    DataGrid myDataGrid;
    
    // Get the DataGrid of the column.
    myDataGrid = thisColumn.DataGrid;
 }

注解

此属性在属性更改时System.Windows.Forms.DataGridDataGridTableStyle 调用。 此属性是必需的,因为 托管 DataGridColumnStyle 的任何子控件都必须添加到控件 System.Windows.Forms.DataGridControlCollection

适用于

另请参阅