PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Initial position (control and window)
  • Hidden button
  • Position of an anchored control
  • Elements of a Looper control
  • Limits for the windows and window controls
  • Limits in the reports
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 X property is used to:
  • Get the X-coordinate of a control, Table control column or window (position on the X-axis).
  • Change the X-coordinate of a control or window (position on the X-axis).
This property can be used on a window or on controls in a window, page or report.
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for 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 report controls in 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 report controls in 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 report controls in iPhone/iPad applications.
Versions 20 and later
AndroidiPhone/iPad This property is now available for Table controls in Android and iPhone/iPad applications.
New in version 20
AndroidiPhone/iPad This property is now available for Table controls in Android and iPhone/iPad applications.
AndroidiPhone/iPad This property is now available for Table controls in Android and iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Example
// Find out the X-coordinate of "IMG_Image" control
ResX = IMG_Image.X
Syntax

Finding out the X-coordinate of an element Hide the details

<Result> = <Element used>.X
<Result>: Integer
  • X-coordinate of specified element:
    • If the control belongs to a window, this X-coordinate is expressed in pixels. 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 to the horizontal position of top left corner of element in relation to the top left corner of te block to which the control belongs.
    • If the control belongs to a page, this X-coordinate is expressed in pixels. It corresponds to:
    • X-coordinate of specified column in a Table control (in pixels). Horizontal position of top left corner of column in relation to the top left corner of Table control.
    • WINDEV Mobile X-coordinate of the specified window (in pixels). Horizontal position of top left corner of window in relation to the top left corner of the screen.
    <Element used>: Character string (with or without quotes)
    Name of element whose X-coordinate is requested.
    For a control associated with a tab, use the following notation:
    <Tab name>.<Control name>

    Modifying the X-coordinate of an element Hide the details

    <Element used>.X = <New X-coordinate>
    <Element used>: Character string (with or without quotes)
    Name of element whose X-coordinate will be modified.
    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:
      • If the control belongs to a window, this X-coordinate is expressed in pixels. 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 to the horizontal position of top left corner of element in relation to the top left corner of te block to which the control belongs.
      • If the control belongs to a page, this X-coordinate is expressed in pixels.
          Remark: The control must be a stackable control otherwise the modification of the X-coordinate will be ignored.
      • New Xcoordinate of specified column in a Table control (in pixels). Horizontal position of top left corner of column in relation to the top left corner of Table control.
      • WINDEV Mobile New X-coordinate for the specified window (in pixels). Horizontal position of top left corner of window in relation to the top left corner of the screen.
      Remarks
      Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

      Initial position (control and window)

      The initial position (defined in the "Details" tab of the object description in the window editor) is returned by this XInitial and YInitial properties. It corresponds to position of the object when the window is opened, and can be modified through programming with the X and Y properties.
      Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

      Hidden button

      You can use a "hidden" button by specifying negative coordinates (with the X and Y properties). These negative coordinates can be used to define specific shortcuts for example. A specific process can be called from a button with negative coordinates so that it is not displayed in the window.
      Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

      Position of an anchored control

      The X property can be used to temporarily modify the X-coordinate of an anchored control (until the window is resized).
      To permanently change the position of an anchored control, use the XInitial and YInitial properties.
      Versions 22 and later
      Universal Windows 10 AppiPhone/iPadIOS Widget

      Elements of a Looper control

      The X property can be used on the elements of a Looper control. In this case, the X property is used to get the coordinates of the row inside the visible area of the Looper control.
      If the element is not displayed in the visible part of the Looper control, the X property will return -4000.
      Example:
      LooperDisplay(LOOP_NoName1, 10)
      ThreadPause(200)
      Info(".X of elment 10: " + LOOP_NoName1[10].X)
      New in version 22
      Universal Windows 10 AppiPhone/iPadIOS Widget

      Elements of a Looper control

      The X property can be used on the elements of a Looper control. In this case, the X property is used to get the coordinates of the row inside the visible area of the Looper control.
      If the element is not displayed in the visible part of the Looper control, the X property will return -4000.
      Example:
      LooperDisplay(LOOP_NoName1, 10)
      ThreadPause(200)
      Info(".X of elment 10: " + LOOP_NoName1[10].X)
      Universal Windows 10 AppiPhone/iPadIOS Widget

      Elements of a Looper control

      The X property can be used on the elements of a Looper control. In this case, the X property is used to get the coordinates of the row inside the visible area of the Looper control.
      If the element is not displayed in the visible part of the Looper control, the X property will return -4000.
      Example:
      LooperDisplay(LOOP_NoName1, 10)
      ThreadPause(200)
      Info(".X of elment 10: " + LOOP_NoName1[10].X)
      AndroidiPhone/iPadIOS Widget

      Limits for the windows and window controls

      AndroidiPhone/iPadIOS Widget The X property does not apply to table columns.
      Universal Windows 10 AppiPhone/iPadIOS Widget

      Limits in the reports

      The X property cannot be used on:
      • a report,
      • a report block.
      Remark:
      • A control cannot be displayed outside the block to which it belongs.
      • The Height and Width properties are used to get the height and width of a report control or report block.
      Minimum version required
      • Version 9
      This page is also available for…
      Comments
      Click [Add] to post a comment