ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Limits
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 XInitial property is used to:
  • Get the X-coordinate:
    • of a control (position on the X-axis) when opening the window or the page.
    • of a window (position on X-axis) when opening the window.
  • Change the X-coordinate of a control anchored "to the right" (position on the X-axis) when opening the window.
  • Get the X-coordinate of a control in relation to its block (position in millimeters on the X-axis) when opening the report.
Remark: The X-coordinate of a control or window corresponds to the X-coordinate specified in the "UI" tab, in their description window.
This X-coordinate defines the control or window position when opening the window, page or report.
Example
// Moves the control 10 millimeters to the right
STC_Title.X = STC_Title.X + 10
// Restores the initial position
STC_Title.X = STC_Title.XInitial
Syntax

Getting the X-coordinate of a control or window Hide the details

<Result> = <Element used>.XInitial
<Result>: Integer
  • X-coordinate of specified element:
    • If the control belongs to a window: this X-coordinate is expressed in pixels. When the window is opened, it corresponds to the horizontal position of the upper-left corner of the control, relative to the upper-left corner of the window's client area (i.e. the window without title bar, menu bar or borders).
    • If the control belongs to a report: this X-coordinate is expressed in millimeters. It corresponds, when opening the report, to the horizontal position of the upper-left corner of the control in relation to the upper-left corner of the block.
    • If the control belongs to a page: this X-coordinate is expressed in pixels. It corresponds, when opening the report, to:
    • Universal Windows 10 AppAndroidiPhone/iPadIOS Widget X-coordinate of window (in pixels) when it is opened. Horizontal position of the upper-left corner of the window in relation to the upper-left corner of the screen.
    <Element used>: Control name or window name
    Name of element (control or window) to use.
    For a control associated with a tab, use the following notation:
    <Tab name>.<Control name>
    Universal Windows 10 AppAndroidiPhone/iPadIOS Widget

    Changing the X-coordinate of a control anchored "to the right" Hide the details

    <Control used>.XInitial = <New X-coordinate>
    <Control used>: Control name
    Name of the control to be used. If the control is not anchored to the right, the XInitial property has no effect.
    For a control associated with a tab, use the following notation:
    <Tab name>.<Control name>
    <New X-coordinate>: Integer
    New X-coordinate of the specified control (in pixels). Horizontal position of the upper-left corner of the control, relative to the upper-left corner of the window's client area (i.e. the window without title bar, menu bar or borders).
    Remarks

    Limits

    Universal Windows 10 AppiPhone/iPadIOS Widget For a report, the XInitial property only applies to the report controls.
    WINDEV Mobile The XInitial property cannot be used on:
    • an option in a check box or radio button,
    • a row in a list box, in a combo box or in a table,
    • a table cell,
    • a group of controls,
    • a window menu,
    • an element of a TreeView control.
    Minimum version required
    • Version 9
    This page is also available for…
    Comments
    Click [Add] to post a comment

    Last update: 05/26/2022

    Send a report | Local help