DataGridView.AccessibilityNotifyCurrentCellChanged(Point) 方法

定义

当新单元格成为当前的单元格时,通知可访问的客户端应用程序。Notifies the accessible client applications when a new cell becomes the current cell.

protected:
 virtual void AccessibilityNotifyCurrentCellChanged(System::Drawing::Point cellAddress);
protected virtual void AccessibilityNotifyCurrentCellChanged (System.Drawing.Point cellAddress);
abstract member AccessibilityNotifyCurrentCellChanged : System.Drawing.Point -> unit
override this.AccessibilityNotifyCurrentCellChanged : System.Drawing.Point -> unit
Protected Overridable Sub AccessibilityNotifyCurrentCellChanged (cellAddress As Point)

参数

cellAddress
Point

一个 Point,指示新的当前单元格的行和列索引。A Point indicating the row and column indexes of the new current cell.

异常

cellAddressX 属性值小于 0 或大于控件中的列数减 1。The value of the X property of cellAddress is less than 0 or greater than the number of columns in the control minus 1.

-or- cellAddressY 属性值小于 0 或大于控件中的行数减 1。The value of the Y property of cellAddress is less than 0 or greater than the number of rows in the control minus 1.

注解

此方法将指定的行索引和列索引转换为 @no__t 0 和 @no__t 参数,并使用 @no__t 5 枚举的 @no__t 和 @no__t 的值调用第 2 @no__t 方法重载两次。This method converts the specified row and column indexes into objectID and childID parameters and calls the AccessibilityNotifyClients(AccessibleEvents, Int32, Int32) method overload twice using the Focus and Selection values of the AccessibleEvents enumeration. 通过对显示顺序中的可见行和列进行编号来确定 @no__t 0 和 childID,如果行标题或列标题可见,则对其进行计数,从1开始。The objectID and childID are determined by numbering only the visible rows and columns in their display order, counting the row or column headers if they are visible, and starting with 1. 例如,如果列标题可见,则第一个可见 nonheader 行的 @no__t 为2。For example, if column headers are visible, the objectID for the first visible nonheader row is 2.

继承者说明

自定义 DataGridView 控件并修改当前单元格的更改方式和时间时,重写此方法。Override this method when customizing the DataGridView control and modifying how and when the current cell changes. 例如,如果您创建了一个自定义行类型,该类型将多个单元格合并为单个单元,并相应地修改了导航,则可以重写此方法以提供对所做更改的辅助功能支持。For example, if you create a custom row type that merges multiple cells into single cells and you modify the navigation accordingly, you can override this method to provide accessibility support for your changes.

适用于

另请参阅