語言

DataGridViewRow.DataGridViewRowAccessibleObject.Select 方法

定義

修改選取範圍或移動可存取物件的鍵盤焦點。

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)

參數

flags
AccessibleSelection

這是其中一項 AccessibleSelection 價值。

例外狀況

該財產的 Owner 價值為 null。

備註

下表描述該 Select 方法對每個 flags 值將執行的動作。

參數值 Action
TakeFocus 這 DataGridView 需要專注。
TakeSelection 排內的部分 DataGridViewCell 需要對焦。
AddSelection 該 DataGridViewCell 資產被加入 SelectedCells 物業。
RemoveSelection 它 DataGridViewCell 被從物業中移除 SelectedCells 。

當你指定 值 TakeSelection 時,目前聚焦的欄位 DataGridViewCell 與當前 中將聚焦 DataGridViewRow的格子相同。 例如,如果第 10 列第 3 格有焦點,你指定 TakeSelection 第 15 列,第 15 格則是第 3 格。 如果該列的第一個格子沒有DataGridViewCellDataGridView焦點,則會被焦點。

適用於

另請參閱