PC SOFT

WINDEV的在线文档

  • Horizontal alignment and text not entirely displayed in the control
  • Vertical alignment
  • Limitation
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

The horizontal alignment of a control consists in defining the position of the text in the control in relation to the borders of the control. This allows you to center the content of a Static control in relation to the borders of the control.

Several alignments are available:

  • alignment to the left

  • alignment to the right

  • centered

  • justified

..水平对齐 is used to find out and modify the horizontal alignment of a control.

The initial alignment of the control is defined in the editor during the control description.

18版本和更高版本
WinDevWindows Store apps This property is now available in Windows Store Apps mode.
18新版本
WinDevWindows Store apps This property is now available in Windows Store Apps mode.
WinDevWindows Store apps This property is now available in Windows Store Apps mode.
例子
// If the control is left-aligned, align it to the right
如果STC_Static1..水平对齐=水平对齐.左对齐,那么
STC_Static1..水平对齐=水平对齐.右对齐
结束

语法

Finding out the horizontal alignment of a control 隐藏详细信息

<Current Alignment>..水平对齐 = <Control Name>
<Current Alignment>: Integer constant
Current horizontal alignment of the control. The possible values are as follows:
水平对齐.居中The text is centered
水平对齐.右对齐The text is aligned to the right
水平对齐.左对齐The text is aligned to the left
水平对齐.两端对齐The text is justified
水平对齐.无定义Alignment defined by the inheritance of CSS.
This constant is available in WebDev only.
<Control Name>: Character string (with or without quotes)
Name of the control to use.

Modifying the horizontal alignment of a control 隐藏详细信息

<Control Name>..水平对齐 = <New Alignment>
<Control Name>: Character string (with or without quotes)
Name of the control to use.
<New Alignment>: Integer constant
New horizontal alignment of the control. The possible values are as follows:
水平对齐.居中The text is centered
水平对齐.右对齐The text is aligned to the right
水平对齐.左对齐The text is aligned to the left
水平对齐.两端对齐The text is justified
水平对齐.无定义Alignment defined by the inheritance of CSS.
This constant is available in WebDev only.

注意
WinDevWindows Store apps用户代码(MCU)

Horizontal alignment and text not entirely displayed in the control

The following information is displayed if the text cannot be entirely displayed in the control:
  • In the report editor, the left part of the text is displayed.
  • In the window editor:
    • in a static control, the right part of the text is displayed.
    • in an edit control, the left part of the text is displayed.

Vertical alignment

To define the vertical alignment of the control, use ..垂直对齐.

Limitation

WinDev In a window, ..水平对齐 is used to find out and modify the horizontal alignment for the following types of controls:
  • Static
  • Edit control
  • Combo box (editable or not)
  • Check box/Radio button
  • List box
  • ListView
  • Image
  • Column in a table and column in a treeview table
  • Cell in a status bar
  • Bar code
  • Chart
  • Progress bar. The property is used to find out and modify the horizontal alignment for the percentage of progress displayed in the progress bar.
  • 17版本和更高版本
    Rating control
    17新版本
    Rating control
    Rating control
  • 17版本和更高版本
    Organization chart
    17新版本
    Organization chart
    Organization chart

WinDev In a report, ..水平对齐 is used to find out and modify the horizontal alignment for the following types of controls:
  • Static control
  • Calculated control
  • Preset control
  • Item control
  • 17版本和更高版本
    Chart control
    17新版本
    Chart control
    Chart control
  • Groups of controls. This property will only be applied to the controls that support the horizontal alignment.