CurrentSectionTop 屬性

此頁沒有內(nèi)容條目
內(nèi)容

expandtri全部顯示

應用該屬性可以確定從當前節(jié)的頂邊到窗體頂邊的距離,以為單位。

expression.CurrentSectionTop

expression     必需。返回“應用于”列表中的一個對象的表達式。

說明

此屬性設置僅在使用Visual Basic 時使用。

用戶滾動窗體時,CurrentSectionTop 屬性的設置將會改變。

對于 DefaultView 屬性設置為“單一窗體”的窗體,當用戶將滾動條拖到窗體左上角的上方時,該屬性的值將成為負數(shù)。

對于 DefaultView 屬性設置為“連續(xù)窗體”的窗體,如果當前節(jié)不可見,那么 CurrentSectionTop 屬性與窗體的 InsideHeight 屬性值相等.

CurrentSectionTop 屬性用于查找“窗體”視圖連續(xù)窗體的或“數(shù)據(jù)表”視圖中的主體節(jié)位置。每一個主體節(jié)都有不同的 CurrentSectionTop 屬性設置,取決于該節(jié)在窗體中的位置。

示例

下面的示例顯示了連續(xù)窗體上一個控件的 CurrentSectionLeftCurrentSectionTop 屬性設置。當用戶移到一個新記錄時,當前節(jié)的屬性設置將顯示在窗體標題的 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