ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Initial position (control and window)
  • Hidden button
  • Position of an anchored control
  • Elements of a Looper control
  • Limits for the report controls
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 Y property is used to:
  • Find out the Y-coordinate of a control or window (position on Y-axis).
  • Modify the Y-coordinate of a control or window (position on Y-axis).
This property can be used on the controls found in a window, in a page or in a report, and on the windows.
Example
// Find out the Y-coordinate of "IMG_Image"
ResYCoordinate = IMG_Image.Y
Syntax

Finding out the Y-coordinate of a control or window Hide the details

<Result> = <Element used>.Y
<Result>: Integer
  • Y-coordinate of specified control:
    • in a window, this Y-coordinate is expressed in pixels. This Y-coordinate corresponds the vertical 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).
    • in a report, this Y-coordinate is expressed in millimeters. This Y-coordinate corresponds to the vertical position of the upper-left corner of the control in relation to the upper-left corner of the block to which the control belongs.
    • in a page, this Y-coordinate is expressed in pixels.
    • Y-coordinate of the specified window (in pixels). Vertical position of the upper-left corner of the window, relative 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 control, use the following notation:
    <Tab name>.<Control name>

    Modifying the Y-coordinate of a control or window Hide the details

    <Element used>.Y = <New Y-coordinate>
    <Element used>: Control name or window name
    Name of element whose Y-coordinate will be modified.
    For a control associated with a Tab control, use the following notation:
    <Tab name>.<Control name>
    <New Y-coordinate>: Integer
    • New Y-coordinate for the specified control:
      • in a window, this Y-coordinate is expressed in pixels. This Y-coordinate corresponds the vertical 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).
      • in a report, this Y-coordinate is expressed in millimeters. This Y-coordinate corresponds to the vertical position of the upper-left corner of the control in relation to the upper-left corner of the block to which the control belongs.
      • in a page, this Y-coordinate is expressed in pixels.
          Remark: The control must be overlayable, otherwise the change of the Y-coordinate will be ignored.
      • New Y-coordinate for the specified window (in pixels). Vertical position of the upper-left corner of the window, relative to the upper-left corner of the screen.
      Remarks
      Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple WatchMac Catalyst

      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 control by specifying negative coordinates (with the Y and X properties). These negative coordinates can be used to define specific shortcuts for example. A specific process can be called from a Button control with negative coordinates so that it does not appear in the window.
      Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

      Position of an anchored control

      The Y property can be used to temporarily modify the Y-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.
      Universal Windows 10 AppiPhone/iPadIOS Widget

      Elements of a Looper control

      The Y property can be used on the elements of a Looper control. In this case, the Y 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 Y property will return -4000.
      Example:
      LooperDisplay(LOOP_NoName1, 10)
      ThreadPause(200)
      Info(".Y of element 10: " + LOOP_NoName1[10].Y)

      Limits for the report controls

      The Y property cannot be used on:
      • a report,
      • a report block.
      Remarks
      • 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

      Last update: 05/26/2022

      Send a report | Local help