DataGridViewCell.DataGridViewCellAccessibleObject.Select(AccessibleSelection) Method

Definition

修改选择内容或移动辅助性对象的键盘焦点。Modifies the selection or moves the keyboard focus of the accessible object.

public:
 override void Select(System::Windows::Forms::AccessibleSelection flags);
public override void Select (System.Windows.Forms.AccessibleSelection flags);
override this.Select : System.Windows.Forms.AccessibleSelection -> unit
Public Overrides Sub Select (flags As AccessibleSelection)

Parameters

flags
AccessibleSelection

AccessibleSelection 值之一。One of the AccessibleSelection values.

Exceptions

Owner 属性的值为 nullThe value of the Owner property is null.

Remarks

下表描述了 Select 方法针对每个 flags 值执行的操作。The following table describes the action performed by the Select method for each flags value.

参数值Parameter value 操作Action
TakeFocus DataGridView 获取焦点。The DataGridView takes focus.
TakeSelection 拥有此 DataGridViewCell.DataGridViewCellAccessibleObjectDataGridViewCell 取得焦点。The DataGridViewCell that owns this DataGridViewCell.DataGridViewCellAccessibleObject takes focus.
AddSelection DataGridViewCell 将添加到 SelectedCells 属性中。The DataGridViewCell is added to the SelectedCells property.
RemoveSelection 将从 SelectedCells 属性中删除 DataGridViewCellThe DataGridViewCell is removed from the SelectedCells property.
所有其他 AccessibleSelectionAll other AccessibleSelection values 不执行任何操作。No action is taken.

Applies to

See also