FMX.Forms.TCommonCustomForm.Position

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Position: TFormPosition read FPosition write SetPosition default TFormPosition.DefaultPosOnly;

C++

__property TFormPosition Position = {read=FPosition, write=SetPosition, default=2};

Properties

Type Visibility Source Unit Parent
property public
FMX.Forms.pas
FMX.Forms.hpp
FMX.Forms TCommonCustomForm

Description

Represents the size and placement of the form.

Use Position to get or set the size and placement of the form. Position can have one of the following TFormPosition values:

Value Meaning

Designed

The form appears positioned on the screen and with the same height and width as it had at design time.

Default

The form appears in a position on the screen and with a height and width determined by the operating system. Each time you run the application, the form moves slightly down and to the right. The right side of the form is always near the rightmost side of the screen, and the bottom of the form is always near the bottom of the screen, regardless of the screen's resolution.

The operating system only supports this for overlapped windows. For a pop-up or child window (that has a BorderStyle of None, for example), the window is positioned in the upper-left corner of the screen.

On OS X, the default position for new windows is the upper-left corner of the screen.

DefaultPosOnly

The form displays with the size you created it at design time, but the operating system chooses its position on the screen. Each time you run the application, the form moves slightly down and to the right. When the form can no longer move down and to the right and keep the same size while remaining entirely visible on the screen, the form displays in the upper-left corner of the screen.

The operating system only supports this for overlapped windows. For a pop-up or child window (that has a BorderStyle of None, for example), the window is positioned in the upper-left corner of the screen.

On OS X, the default position for new windows is the upper-left corner of the screen.

DefaultSizeOnly

The form appears in the position you left it at design time, but the operating system chooses its size. The right side of the form is always near the rightmost side of the screen, and the bottom of the form is always near the bottom of the screen, regardless of the screen's resolution.

ScreenCenter

The form remains the size you left it at design time, but is positioned in the center of the screen.

DesktopCenter

The form remains the size you left it at design time, but is positioned in the center of the screen. No adjustments are made for multi-monitor applications.

MainFormCenter

The form remains the size you left it at design time, but is positioned in the center of the application's main form. No adjustments are made for multi-monitor applications. This position should only be used with secondary forms. If set for a main form, it acts like ScreenCenter.

OwnerFormCenter

The form remains the size you left it at design time, but is positioned in the center of the owner form. If there is no owner form, this position acts like MainFormCenter.

Note that, if Position is set to Default, DefaultPosOnly, or DefaultSizeOnly, and BorderStyle is set to None, the form will be positioned at (0,0).

See Also