PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Vertical alignment
  • Limitation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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 control borders.
Several alignments are available:
  • alignment to left
    Text aligned to left
  • alignment to right
    Text aligned to right
  • centered
    Text centered
  • justified
..HorizontalAlignment is used to find out and modify the horizontal alignment of a control.
The initial alignment of control is defined in the editor during the control description.
Example
// If the control is left-aligned, align it to right
IF STC_Static1..HorizontalAlignment = haLeft THEN
STC_Static1..HorizontalAlignment = haRight
END
Syntax

Finding out the horizontal alignment of a control Hide the details

<Current alignment>..HorizontalAlignment = <Control used>
<Current alignment>: Integer constant
Current horizontal alignment of control. The possible values are:
haCenterThe text is centered.
haRightThe text is aligned to right.
haLeftThe text is aligned to left.
haJustifiedThe text is justified.
haNotDefinedAlignment defined by the CSS inheritance.
This constant is available in WEBDEV only.
<Control used>: Control name
Name of control to use.

Modifying the horizontal alignment of a control Hide the details

<Control used>..HorizontalAlignment = <New alignment>
<Control used>: Control name
Name of control to use.
<New alignment>: Integer constant
New horizontal alignment of the control. The possible values are:
haCenterThe text is centered.
haRightThe text is aligned to right.
haLeftThe text is aligned to left.
haJustifiedThe text is justified.
haNotDefinedAlignment defined by the CSS inheritance.
This constant is available in WEBDEV only.
Remarks

Vertical alignment

To define the vertical alignment of the control, use ..VerticalAlignment.

Limitation

WEBDEV - Server code In a page, ..HorizontalAlignment is used to find out and modify the horizontal alignment for the following types of controls:
  • Static, HTML static
  • Edit control
  • Button
  • Check Box / Radio Button
  • Table, table column
  • Versions 18 and later
    Treeview table, column in treeview table
    New in version 18
    Treeview table, column in treeview table
    Treeview table, column in treeview table
  • Table cell (in read-only)
  • Formatted control
  • List box, Combo box
  • Looper
  • HTML control
  • Link
  • Pager
  • Breadcrumb
  • TreeView
PHP In a PHP page, ..HorizontalAlignment is used to find out and modify the horizontal alignment for the following types of controls:
  • Static, HTML static
  • Edit control
  • Button
  • Check Box / Radio Button
  • Table, table column
  • Versions 18 and later
    Treeview table, column in treeview table
    New in version 18
    Treeview table, column in treeview table
    Treeview table, column in treeview table
  • Formatted control
  • List box, Combo box
  • Looper
  • HTML control
  • Link
  • Pager
  • TreeView
WEBDEV - Server code In a report, ..HorizontalAlignment is used to find out and modify the horizontal alignment for the following types of controls:
  • Static control.
  • Calculated control.
  • Preset control.
  • Versions 17 and later
    Chart control.
    New in version 17
    Chart control.
    Chart control.
  • Groups of controls. This property will only be applied to the controls that support the horizontal alignment.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment