DataGridView.StandardTab 属性

定义

获取或设置一个值,该值指示按 Tab 键是否会将焦点按 Tab 键顺序移到下一个控件,而不是将焦点移到控件中的下一个单元格。Gets or sets a value indicating whether the TAB key moves the focus to the next control in the tab order rather than moving focus to the next cell in the control.

public:
 property bool StandardTab { bool get(); void set(bool value); };
public bool StandardTab { get; set; }
member this.StandardTab : bool with get, set
Public Property StandardTab As Boolean

属性值

如果按 Tab 键会将焦点按 Tab 键顺序移到下一个控件,为 true;否则为 falsetrue if the TAB key moves the focus to the next control in the tab order; otherwise, false.

注解

如果将此属性设置为 false,则 TAB 键将焦点移动到单元格的网格上。Setting this property to false allows the TAB key to move the focus through the grid of cells. 下表描述按下给定的 TAB 键组合时单元格焦点如何变化。The following table describes how the cell focus changes when the given TAB key combinations are pressed.

组合键Key combination 结果Result
TabTAB 如果 @no__t 的 @no__t 属性为-1,则焦点将移到行中的下一个单元格。If the StandardTab property is false, the focus moves to the next cell in the row. 如果焦点位于行中的最后一个单元格,则焦点将移到下一行中的第一个单元格。If the focus is in the last cell in the row, the focus moves to the first cell in the next row. 如果焦点位于 DataGridView 中的最后一个单元格,则焦点按 tab 键顺序移到下一个控件。If the focus is in the last cell in the DataGridView, the focus moves to the next control in the tab order.
Shift+TabSHIFT+TAB 如果 StandardTab @no__t 为-1,焦点将移动到行中的上一个单元格。If StandardTab is false, the focus moves to the previous cell in the row. 如果焦点位于行中的第一个单元格,则焦点将移到上一行中的最后一个单元格。If the focus is in the first cell in the row, the focus moves to the last cell in the previous row. 如果焦点位于 DataGridView 的第一个单元格中,则焦点按 tab 键顺序移到上一个控件。If the focus is in the first cell in the DataGridView, the focus moves to the previous control in the tab order.
Ctrl+TabCTRL+TAB 焦点按 tab 键顺序移到下一个控件。The focus moves to the next control in the tab order.

适用于

另请参阅