Table of contents
TOC
折叠目录
展开目录

WebBrowserControl.TabIndex 属性 (访问)WebBrowserControl.TabIndex Property (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

文本框的 TabIndex属性可用于在窗体或报表上的 tab 键顺序指定控件的位置。读取/写入的整数You can use the TabIndex property to specify a control's place in the tab order on a form or report. Read/write Integer.

语法Syntax

表达式选项卡索引expression. TabIndex

表达式_一个表示WebBrowserControl对象的变量。_expression A variable that represents a WebBrowserControl object.

注解Remarks

您可以将TabIndex属性设置为一个整数,表示该控件在窗体的 tab 键次序中的位置。有效设置可以从 0 到总控件数减 1 的最后一个选项卡位置的第一个选项卡位置。例如,如果某个窗体有三个每个具有TabIndex属性的控件,其有效的TabIndex属性设置是 0、 1 和 2。You can set the TabIndex property to an integer representing the position of the control within the tab order of the form. Valid settings are 0 for the first tab position, up to the total number of controls minus 1 for the last tab position. For example, if a form has three controls that each have a TabIndex property, valid TabIndex property settings are 0, 1, and 2.

将该文本框的 TabIndex属性设置为一个整数小于 0 产生错误。Setting the TabIndex property to an integer less than 0 produces an error.

默认情况下,Microsoft Access 为按顺序创建这些窗体上的控件指定 tab 键顺序。每个新控件位于 tab 键次序中的最后一次。如果要更改控件的TabIndex属性设置,以调整 tab 键次序,Microsoft Access 自动重新编号其他控件的TabIndex属性的设置,以反映插入和删除。By default, Microsoft Access assigns a tab order to controls in the order that you create them on a form. Each new control is placed last in the tab order. If you change the setting of a control's TabIndex property to adjust the tab order, Microsoft Access automatically renumbers the TabIndex property setting of other controls to reflect insertions and deletions.

在窗体视图中,隐藏或禁用的控件仍然处于 Tab 键次序中,只是在按下 Tab 时将跳过它们。In Form view, invisible or disabled controls remain in the tab order but are skipped when you press the TAB key.

更改窗体上其他控件的 tab 键次序不会影响按下某个控件的访问键时,会发生什么情况。例如,如果已经创建了一个文本框的标签的访问键,焦点就会移到文本框中只要按下标签的访问键,即使更改了该文本框的 tabindex 属性Changing the tab order of other controls on the form doesn't affect what happens when you press a control's access key. For example, if you've created an access key for the label of a text box, the focus will move to the text box whenever you press the label's access key — even if you change the TabIndex property setting for the text box.

如果您按某个控件 (如标签),没有TabIndex属性 (因而不在 tab 键次序中) 的访问键,焦点将移到下一个控件可以接收焦点的 tab 键顺序。If you press an access key for a control such as a label that doesn't have a TabIndex property (and thus isn't in the tab order), the focus moves to the next control in the tab order that can receive the focus.

示例Example

下面的示例翻转命令按钮和文本框的 tab 键次序。因为第一次创建 TextBox1,它的TabIndex属性设置为 0 并且 Command1 已设置为 1。The following example reverses the tab order of a command button and a text box. Because TextBox1 was created first, it has a TabIndex property setting of 0 and Command1 has a setting of 1.

Sub Form_Click() 
 Me!Command1.TabIndex = 0 
 Me!TextBox1.TabIndex = 1 
End Sub

另请参阅See also

概念Concepts

WebBrowserControl 对象WebBrowserControl Object

© 2018 Microsoft