ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Horizontal alignment
  • Limitations
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 vertical alignment of a control consists in defining the text position in the control in relation to the control borders. This allows you to center the content of an edit control in relation to the borders of input area.
Three types of alignment are available:
  • Alignment to top
    image of top-aligned text
  • Alignment in the middle
    image of text aligned in the middle
  • Alignment at bottom
    image of bottom-aligned text
The VerticalAlignment property is used to get and change the vertical alignment of a control.
The initial alignement of the control is defined when describing the control.
Example
// If the control is aligned to top, align it at bottom
IF STC_Static.VerticalAlignment = vaTop THEN
STC_Static.VerticalAlignment = vaBottom
END
Syntax

Finding out the vertical alignment of a control Hide the details

<Current alignment> = <Control used>.VerticalAlignment
<Current alignment>: Integer constant
Current vertical alignment of control. The possible values are as follows:
vaBottomthe text is located at the bottom of the control
vaMiddlethe text is located in the middle of the control
vaTopthe text is located at the top of the control

WEBDEV - Server codePHP Additional alignment options are available:
vaAboveVertical alignment above the line, in superscript (correspond to the CSS "super" value)
vaAutoAutomatic vertical alignment (correspond to the CSS "auto" value)
vaBaselineVertical alignment according to the base line (correspond to the CSS "baseline" value)
vaBelowVertical alignment below the line, as subscript (correspond to the CSS "sub" value)
vaNotDefinedVertical alignment inherited from the parent
vaTextBottomVertical alignment flushed to the bottom (correspond to the CSS "text-bottom" value)
vaTextTopVertical alignment flushed to the top (correspond to the CSS "text-top" value)
<Control used>: Control name
Name of the control to be used.

Modifying the vertical alignment of control Hide the details

<Control used>.VerticalAlignment = <New alignment>
<Control used>: Control name
Name of the control to be used.
<New alignment>: Integer constant
New alignment of the control. The possible values are:
vaBottomthe text is located at the bottom of the control
vaMiddlethe text is located in the middle of the control
vaTopthe text is located at the top of the control

WEBDEV - Server codePHP Additional options for the vertical alignment can be specified via the following constants:
vaAboveVertical alignment above the line, in superscript (correspond to the CSS "super" value)
vaAutoAutomatic vertical alignment (correspond to the CSS "auto" value)
vaBaselineVertical alignment according to the base line (correspond to the CSS "baseline" value)
vaBelowVertical alignment below the line, as subscript (correspond to the CSS "sub" value)
vaNotDefinedVertical alignment inherited from the parent
vaTextBottomVertical alignment flushed to the bottom (correspond to the CSS "text-bottom" value)
vaTextTopVertical alignment flushed to the top (correspond to the CSS "text-top" value)
Remarks

Horizontal alignment

To define the horizontal alignment of the control, use the HorizontalAlignment property.

Limitations

WINDEV In a window, the VerticalAlignment property is used to get and change the vertical alignment for the following types of controls:
  • Static
  • Check Box or Radio Button
  • Image
  • Column in a Table or TreeView Table
  • List Box
  • Combo Box
  • Bar Code
  • Chart
  • Rating control
  • Organization Chart
WEBDEV - Server code In a page, the VerticalAlignment property is used to get and change the vertical alignment for the following types of controls:
  • Edit control
  • Static
  • Button
  • Check Box / Radio Button
  • List box, Combo box
  • Table
  • Table cell (read-only)
  • TreeView Table, cell of TreeView Table (read-only)
  • Formatted display control
  • HTML control
  • Link
  • HTML static
  • Pager
  • Breadcrumb
  • TreeView
  • Progress Bar
  • Scheduler
  • Rating control
PHP In a page, the VerticalAlignment property is used to get and change the vertical alignment for the following types of controls:
  • Edit control
  • Static control
  • Button control
  • Check Box and Radio Button controls
  • List Box or Combo Box control
  • Table control
  • TreeView Table control and cells of a TreeView Table control
  • Formatted display control
  • HTML control
  • Link control
  • HTML Static control
  • Pager control
  • TreeView control
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPad In a report, the VerticalAlignment property is used to get and change the vertical alignment for the following types of controls:
  • Static control.
  • Calculated control.
  • Preset control.
  • Chart control.
  • Group of controls: This property will only apply to controls that support vertical alignment.
AndroidJava The VerticalAlignment property can only be used in the following controls:
  • Static.
  • Image.
  • Check Box.
  • Radio Button.
  • Combo Box.
Android The VerticalAlignment property can be used on table columns.

iPhone/iPad The VerticalAlignment property applies to all types of controls (table columns, static text, etc.).
IOS Widget The VerticalAlignment property can be used on Static controls.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help