DataGridColumnStyle.CreateHeaderAccessibleObject 方法

定义

获取列的 AccessibleObjectGets the AccessibleObject for the column.

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

用于列的 AccessibleObjectAn AccessibleObject for the column.

示例

下面的代码示例获取 System.Windows.Forms.DataGridDataGridColumnStyleThe following code example gets the System.Windows.Forms.DataGrid of a DataGridColumnStyle.

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;
 }

注解

DataGridTableStyle当属性发生更改时,将调用此属性 System.Windows.Forms.DataGridThis property is called by a DataGridTableStyle when its System.Windows.Forms.DataGrid property changes. 此属性是必需的,因为必须将由承载的任何子控件 DataGridColumnStyle 添加到 System.Windows.Forms.DataGrid 控件的 ControlCollectionThis property is required because any child controls hosted by a DataGridColumnStyle must be added to the System.Windows.Forms.DataGrid control's ControlCollection.

适用于

另请参阅