ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • 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
Horizontal alignment determines how the text is positioned relative to the borders of the control. This allows you to center the content of a Static control in relation to the control borders.
There are different alignment options:
  • align left
    Text aligned left
  • align right
    Text aligned right
  • center
    Centered text
  • justify
The HorizontalAlignment property gets and changes the horizontal alignment of a control.
The initial alignment is defined in the editor, in the control description.
Example
// If the control is aligned left, align it right
IF STC_Static1.HorizontalAlignment = haLeft THEN
STC_Static1.HorizontalAlignment = haRight
END
Syntax

Getting the horizontal alignment of a control Hide the details

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

Changing 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.
haJustifiedThe text is justified.
haLeftThe text is aligned to the left.
haNotDefinedAlignment defined by the CSS inheritance.
This constant is only available in WEBDEV.
haRightThe text is aligned to the right.
Remarks

Vertical alignment

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

Limitation

WEBDEV - Server code In a page, the HorizontalAlignment property gets and changes the horizontal alignment for the following types of controls:
  • Static and HTML Static controls
  • Edit control
  • Button control
  • Check Box and Radio Button controls
  • Table control and its columns
  • TreeView Table control and its columns
  • Table control cells (read-only)
  • Formatted display control
  • List Box and Combo Box controls
  • Looper control
  • HTML control
  • Link control
  • Pager control
  • Breadcrumb control
  • TreeView control
PHP In a PHP page, the HorizontalAlignment property gets and changes the horizontal alignment for the following types of controls:
  • Static and HTML Static controls
  • Edit control
  • Button control
  • Check Box and Radio Button controls
  • Table control and its columns
  • TreeView Table control and its columns
  • Formatted display control
  • List Box and Combo Box controls
  • Looper control
  • HTML control
  • Link control
  • Pager control
  • TreeView control
WEBDEV - Server code In a report, the HorizontalAlignment property gets and changes the horizontal alignment for the following types of controls:
  • Static control.
  • Calculated control.
  • Preset 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

Last update: 09/14/2023

Send a report | Local help