Top property (Display object)

Returns or sets the distance, in pixels, between the external top edge of a display and the internal top edge of the containing window. Read/write. Long.
The value assigned to this property can be negative, which allows a window to be positioned so that no portion of it is visible in the viewing area. If a display is docked, this property is read-only.
The position calculation method varies depending on whether multi-monitor's
Dock and maximize display on a single monitor
option is enabled.
With the option disabled, the zero position is at the top edge of the available viewing area. For example, if a display is docked to the top, the zero position is at the external bottom edge of the display.
  • For a display that is docked to the left or the right, this returns zero or a negative value.
  • For a display that is docked to the top, this returns a negative value.
  • For a display that is docked to the bottom, this returns a value that is larger than the ViewportHeight value.
With the option enabled, the zero position is at the top edge of the entire viewing area. For example, if a display is docked to the top, the zero position is still at the far top of the entire viewing area. In such cases, this property does not return a negative value.
Syntax
Display
.
Top
[ =
value
]
where
Display
– is the name of a Display object or an expression that evaluates to a Display object.
value
– is the distance, in pixels, between the external top edge of the display and the internal top edge of the containing window.
Remarks
  • When a display is minimized, the position changes to match the location of the window icon in the lower left portion of the containing window.
  • When a display is maximized, the value of this property changes to match that of the containing window.
  • You can change the value of this property even if the option, Size to Main Window at Runtime, is specified.
  • Attempts to move or size a display that is minimized, maximized, or docked, raises the error gfxErrorMoveResize.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal