TextAlign属性

适用范围
Button、Label、TextBox、RadioButton、CheckBox、LED

描述
获取或设置控件中的文本对齐。

使用

GGet Form.Control.TextAlign, var  
GSet  Form.Control.TextAlign, value  
Form
指定窗体名称或含有窗体名称的字符串变量。
Control
指定控件名称或含有控件名称的字符串。
var
取得属性值的整数变量。
value
在属性中设定的整数表达式。

数值

  • 对于按钮、标签、单选按钮、复选框控件
    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