PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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
The HorizontalAlignment property is used to get and change 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 the control to be used.

Modifying the horizontal alignment of a control Hide the details

<Control used>.HorizontalAlignment = <New alignment>
<Control used>: Control name
Name of the control to be used.
<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 the control, use the VerticalAlignment property.

Limitation

Reports and Queries In a report, the HorizontalAlignment property is used to get and change 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 apply to controls that support horizontal alignment.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment