TopMargin 屬性

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

expandtri全部顯示

blueup應(yīng)用于 LabelTextBox 對(duì)象的 TopMargin 屬性。

LeftMargin、RightMarginBottomMargin 屬性一起,指定信息在標(biāo)簽文本框控件中的顯示位置。Integer 型,可讀寫。

expression.TopMargin

expression     必需。返回上述對(duì)象之一的一個(gè)表達(dá)式。

說明

控件顯示信息的位置是從控件的左、上、右或下端邊界到顯示信息的左、上、右或下端邊沿之間的距離。當(dāng)將 LeftMarginTopMargin 屬性設(shè)為 0 時(shí),顯示信息位于控件的最左或最上邊。若要使用不同于 Windows 區(qū)域設(shè)置中設(shè)置的度量單位,請(qǐng)指定單位(例如,厘米或英寸)。

在 Visual Basic 中,使用數(shù)值表達(dá)式設(shè)置該屬性的值,值以為單位表示。

可以使用屬性表Visual Basic 設(shè)置這些屬性。

blueup應(yīng)用于 Printer 對(duì)象的 TopMargin 屬性。

LeftMargin、RightMarginBottomMargin 屬性一起,指定打印頁(yè)的邊距。Long 型,可讀寫。

expression.TopMargin

expression     必需。返回 Printer 對(duì)象的表達(dá)式。

示例

blueup應(yīng)用于 LabelTextBox 對(duì)象的 TopMargin 屬性。

下面的示例從“Purchase Orders”窗體的“EmployeeID_Label”標(biāo)簽的邊框頂部,將其中的標(biāo)題偏移 100 緹。

With Forms.Item("Purchase Orders").Controls.Item("EmployeeID_Label")

   .TopMargin = 100

End With