TextAlign屬性

套用至
Button、Label、TextBox、RadioButton、CheckBox、LED

描述
取得或設定控制項中的文字對齊。

使用方式

GGet Form.Control.TextAlign, var  
GSet  Form.Control.TextAlign, value  
Form
指定表單名稱或含表單名稱的字串變數。
Control
指定控制項名稱或含控制項名稱的字串。
var
指定取得屬性值的整數變數。
value
指定屬性中設定的整數運算式。

數值

  • 如為Button、Label、RadioButton、CheckBox控制項
    1 - TopLeft
    2 - TopCenter
    3 - TopRight
    4 - MiddleLeft
    5 - MiddleCenter
    6 - MiddleRight
    7 - BottomLeft
    8 - BottomCenter
    9 - BottomRight
    預設值: 1 - TopLeft (Label 1)
    4 - MiddleLeft (RadioButton, CheckBox)
    5 - MiddleCenter (Button)
    6 - MiddleRight (LED)

  • 文字方塊控制項
    1 - Left
    2 - Center
    3 - Right
    預設值:Left

另請參閱
Button、Label、TextBox、RadioButton、CheckBox、LED、Text

範例

GSet frmMain.lblName.TextAlign, TEXTALIGN_LEFT