CurrentSectionLeft 屬性

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

expandtri全部顯示

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

expression.CurrentSectionLeft

expression     必需。返回“應(yīng)用于”列表中的一個(gè)對(duì)象的表達(dá)式。

說明

此屬性設(shè)置僅在使用Visual Basic 時(shí)才可用。

用戶滾動(dòng)窗體時(shí),CurrentSectionLeft 屬性的設(shè)置將會(huì)改變。

對(duì)于 DefaultView 屬性設(shè)置為“單一窗體”的窗體,如果用戶滾動(dòng)窗體至左邊緣的右側(cè),屬性設(shè)置值將為負(fù)值。

CurrentSectionLeft 屬性用于查找“窗體”視圖連續(xù)窗體的或“數(shù)據(jù)表”視圖中的主體節(jié)位置。

示例

下面的示例顯示了連續(xù)窗體上一個(gè)控件的 CurrentSectionLeftCurrentSectionTop 屬性設(shè)置。當(dāng)用戶移到一個(gè)新記錄時(shí),當(dāng)前節(jié)的屬性設(shè)置將顯示在窗體標(biāo)題的 lblStatus 標(biāo)簽中。

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