ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Initial position (control and window)
  • Position of a Tab control
  • Position of a control in a Tab control
  • Hidden button
  • Position of an anchored control
  • Toolbar
  • Elements of a Looper control
  • Limits for a window and for its controls
  • Limits for the report controls
  • Limits in the pages
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Y property is used to:
  • Find out the Y-coordinate of a control or window (position on Y-axis).
    WEBDEV - Server codeWEBDEV - Browser codePHP This property is used to get the Y-coordinate of a control in a page.
  • Modify the Y-coordinate of a control or window (position on Y-axis).
    WEBDEV - Server codeWEBDEV - Browser codePHP This property is used to modify the Y-coordinate of an overlayable control in a page.
This property can be used on the controls found in a window, in a page or in a report, and on the windows.
Example
// Connaître l'ordonnée du champ "IMG_Image"
ResOrdonnée = 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 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.
      • WEBDEV - Server code It corresponds to the vertical position of the upper-left corner of the control, relative to the upper-left corner of the page. If the control belongs to a container control (HTML cell, Looper, etc.), the-Y-coordinate is relative to the latter.
      • WEBDEV - Browser codePHP It corresponds to the vertical position of the upper-left corner of the control, relative to the upper-left corner of the page.
  • 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.
    Linux The Y-coordinate of window is not available.
<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:
<Nom de l'onglet>.<Nom du champ>

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:
<Nom de l'onglet>.<Nom du champ>
WEBDEV - Server codeWEBDEV - Browser code To modify the Y-coordinate of a page control, this control must be a stackable control.
<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.
      • WEBDEV - Server code It corresponds to the vertical position of the upper-left corner of the control, relative to the upper-left corner of the page. If the control belongs to a container control (HTML cell, Looper, etc.), the-Y-coordinate is relative to the latter.
      • WEBDEV - Browser codePHP It corresponds to the vertical position of the upper-left corner of the control, relative to the upper-left corner of the page.
      Note: The field must be superimposable for the change in its ordinate to take effect.
  • 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.
    Linux The Y-coordinate of window cannot be modified.
Remarks
WINDEVAndroidiPhone/iPadIOS WidgetApple WatchMac CatalystJava

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.
WINDEVJava

Position of a Tab control

The Y property gets and sets the vertical position (in pixels) of the Tab control in relation to the upper-left corner of the window's client area (i.e. window without borders, title and menu bars).
Important: If tab coordinates are modified with the Yproperty, all fields positioned on the tab are also moved.
WINDEVJava

Position of a control in a Tab control

If a control is associated with a tab, its coordinates are not relative to the tab but to the window's client area (i.e. the window without title bar, menu bar or borders).
If, after a modification, the coordinates of a control positioned on a tab no longer belong to the coordinates of this tab, the control is not displayed anymore.
WINDEVAndroidiPhone/iPadIOS WidgetApple WatchJava

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.
WINDEVAndroidiPhone/iPadIOS WidgetApple WatchJava

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.
WINDEV

Toolbar

The Y property can be used on a floating toolbar.
WINDEViPhone/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(ZR_SansNom1, 10)
ThreadPause(200)
Info(".Y de l'élément 10 : " + ZR_SansNom1[10].Y)
WINDEVJava

Limits for a window and for its controls

WINDEV In a window, the Y 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 group of controls,
  • a window menu,
  • an element in a TreeView control.
Java In Java, the Y property applies only to the following elements:
  • Button.
  • Static.
  • Edit control.
  • Image.
  • Check Box.
  • Radio Button.
  • List Box.
  • Combo Box.
  • TreeView.
  • Tab.
  • Window.
  • Table.
  • Supercontrol.

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.
WEBDEV - Server codeWEBDEV - Browser codePHP

Limits in the pages

The Y property cannot be used on:
  • an HTML table,
  • an option in a Check Box or Radio Button control,
  • a row in a List Box control, Combo Box control or Table control,
  • a cell in a Table control,
  • a group of controls.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help