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.
Versions 15 and later
Android This property is now available for the Android applications.
New in version 15
Android This property is now available for the Android applications.
Android This property is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This property is now available for the window controls in the iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for the window controls in the iPhone/iPad applications.
iPhone/iPad This property is now available for the window controls in the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
Versions 20 and later
AndroidiPhone/iPad This property is now available for the table columns in the Android applications and in the iPhone/iPad applications.
New in version 20
AndroidiPhone/iPad This property is now available for the table columns in the Android applications and in the iPhone/iPad applications.
AndroidiPhone/iPad This property is now available for the table columns in the Android applications and in the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
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
WINDEVReports and QueriesAndroidiPhone/iPadWindows MobileUniversal Windows 10 AppJavaUser code (UMC)

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

WINDEV In a window, ..HorizontalAlignment is used to find out and modify the horizontal alignment for the following types of controls:
  • Static control
  • 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.
  • Versions 17 and later
    Rating control
    New in version 17
    Rating control
    Rating control
  • Versions 17 and later
    Organization Chart
    New in version 17
    Organization Chart
    Organization Chart
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
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileUniversal Windows 10 App 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.
Java ..HorizontalAlignment applies to the following controls:
  • Static control.
  • Edit control.
  • Image.
  • Check Box.
  • Radio Button.
  • List Box.
  • Combo Box.
  • Table column (text, combo box or check box).
Versions 20 and later
AndroidiPhone/iPad ..HorizontalAlignment applies to the table columns.
New in version 20
AndroidiPhone/iPad ..HorizontalAlignment applies to the table columns.
AndroidiPhone/iPad ..HorizontalAlignment applies to the table columns.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment