CurrentSectionLeft 属性

expandtri全部显示

应用该属性可以确定从当前的左边到窗体的左边的距离,以为单位。

expression.CurrentSectionLeft

expression     必需。返回“应用于”列表中的一个对象的表达式。

说明

此属性设置仅在使用Visual Basic 时才可用。

用户滚动窗体时,CurrentSectionLeft 属性的设置将会改变。

对于 DefaultView 属性设置为“单一窗体”的窗体,如果用户滚动窗体至左边缘的右侧,属性设置值将为负值。

CurrentSectionLeft 属性用于查找“窗体”视图连续窗体的或“数据表”视图中的主体节位置。

示例

下面的示例显示了连续窗体上一个控件的 CurrentSectionLeftCurrentSectionTop 属性设置。当用户移到一个新记录时,当前节的属性设置将显示在窗体标题的 lblStatus 标签中。

Private Sub Form_Current()

    Dim intCurTop As Integer

    Dim intCurLeft As Integer

    intCurTop = Me.CurrentSectionTop

    intCurLeft = Me.CurrentSectionLeft

    Me!lblStatus.Caption = intCurLeft & " , " & intCurTop

End Sub