PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Horizontal alignment and text not entirely displayed in the control
  • 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 name>
<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 name>: Character string (with or without quotes)
Name of control to use.

Modifying the horizontal alignment of a control Hide the details

<Control name>..HorizontalAlignment = <New Alignment>
<Control name>: Character string (with or without quotes)
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
Reports and Queries

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 text is displayed.
    • in an edit control, the left part of text is displayed.

Vertical alignment

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

Limitation

Reports and Queries 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.
  • Item control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment