FMX.Controls.TPlacement

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TPlacement = (Bottom, Top, Left, Right, Center, BottomCenter, TopCenter, LeftCenter, RightCenter, Absolute, Mouse, MouseCenter);

C++

enum class DECLSPEC_DENUM TPlacement : unsigned char { Bottom, Top, Left, Right, Center, BottomCenter, TopCenter, LeftCenter, RightCenter, Absolute, Mouse, MouseCenter, plBottom _DEPRECATED_ATTRIBUTE3("Use TPlacement.Bottom")  = 0, plTop _DEPRECATED_ATTRIBUTE3("Use TPlacement.Top")  = 1, plLeft _DEPRECATED_ATTRIBUTE3("Use TPlacement.Left")  = 2, plRight _DEPRECATED_ATTRIBUTE3("Use TPlacement.Right")  = 3, plCenter _DEPRECATED_ATTRIBUTE3("Use TPlacement.Center")  = 4, plBottomCenter _DEPRECATED_ATTRIBUTE3("Use TPlacement.BottomCenter")  = 5, plTopCenter _DEPRECATED_ATTRIBUTE3("Use TPlacement.TopCenter")  = 6, plLeftCenter _DEPRECATED_ATTRIBUTE3("Use TPlacement.LeftCenter")  = 7, plRightCenter _DEPRECATED_ATTRIBUTE3("Use TPlacement.RightCenter")  = 8,
    plAbsolute _DEPRECATED_ATTRIBUTE3("Use TPlacement.Absolute")  = 9, plMouse _DEPRECATED_ATTRIBUTE3("Use TPlacement.Mouse")  = 10, plMouseCenter _DEPRECATED_ATTRIBUTE3("Use TPlacement.MouseCenter")  = 11 };

Properties

Type Visibility Source Unit Parent
enum public
FMX.Controls.pas
FMX.Controls.hpp
FMX.Controls FMX.Controls


Description

TPlacement defines how a pop-up component is positioned relative to some point.

A pop-up component can be a TPopup control or a TCustomPopupForm form. A pop-up component can be positioned relative to rectangles specified by ScreenPlacementRect, PlacementRectangle, and PlacementTarget properties, relative to the screen, or relative to the mouse (pointing device) position.

TPlacement can have the following values:

Value Meaning

Bottom

TPopup is positioned on the bottom of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If a TCustomPopupForm form does not fit to the screen, then it is positioned on the top of the PlacementRectangle.
If no offsets are specified, the upper-left corner of the TPopup is the lower-left corner of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget and no PlacementRectangle are specified, the TPopup is positioned relative to the upper-left corner of the screen. If the screen edges obscure the TPopup, it is not repositioned.

Top

TPopup is positioned on the top of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If no offsets are specified, the lower-left corner of the TPopup is the upper-left corner of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget and no PlacementRectangle are specified, the TPopup is positioned relative to the upper-left corner of the screen. If the screen edges obscure the TPopup, it is not repositioned.

Left

TPopup is positioned on the left of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If no offsets are specified, the upper-right corner of the TPopup is the upper-left corner of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget and no PlacementRectangle are specified, the TPopup is positioned relative to the upper-left corner of the screen. If the screen edges obscure the TPopup, it is not repositioned.

Right

TPopup is positioned on the right of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If no offsets are specified, the upper-left corner of the TPopup is the upper-right corner of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget and no PlacementRectangle are specified, the TPopup is positioned relative to the upper-left corner of the screen. If the screen edges obscure the TPopup, it is not repositioned.

Center

TPopup is positioned on the center of the PlacementRectangle with the specified vertical and horizontal offsets. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget and no PlacementRectangle are specified, the center of the TPopup is positioned on the upper-left corner of the screen. If the screen edges obscure the TPopup, it is not repositioned.

BottomCenter

TPopup is positioned on the center of the bottom edge of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If no offsets are specified, the upper edge of TPopup is centered over the bottom edge of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget is specified, it has the same effect as Bottom. If the screen edges obscure the TPopup, it is not repositioned.

TopCenter

TPopup is positioned on the center of the top edge of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If no offsets are specified, the lower edge of TPopup is centered over the top edge of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget is specified, it has the same effect as Top. If the screen edges obscure the TPopup, it is not repositioned.

LeftCenter

TPopup is positioned on the center of the left edge of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If no offsets are specified, the right edge TPopup is centered over the left edge of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget is specified, it has the same effect as Left. If the screen edges obscure the TPopup, it is not repositioned.

RightCenter

TPopup is positioned on the center of the right edge of the PlacementRectangle with the specified vertical and horizontal offsets, oriented outside the PlacementRectangle. If no offsets are specified, the left edge TPopup is centered over the right edge of the PlacementRectangle. If PlacementRectangle is empty, the TPopup is positioned relative to the PlacementTarget. If no PlacementTarget is specified, it has the same effect as Right. If the screen edges obscure the TPopup, it is not repositioned.

Absolute

The TPopup is positioned on the upper-left corner of the TPopup.PlacementRectangle, relative to the upper-left corner of the screen. The rest of the placements properties of the TPopup are ignored. If the screen edges obscure the TPopup, it is not repositioned.

Mouse

The TPopup is positioned relative to the mouse position. The upper-left corner of the TPopup is the position of the mouse. The rest of the placements properties of the TPopup are ignored. If the screen edges obscure the TPopup, it is not repositioned. Size is used to define the size of a TCustomPopupForm form.

MouseCenter

The TPopup is positioned relative to the mouse position. The mouse position is the center of the top edge of the TPopup. The rest of the placements properties of the TPopup are ignored. If the screen edges obscure the TPopup, it is not repositioned. Size is used to define the size of a TCustomPopupForm form.

This figure demonstrates the TopCenter value.

Screen Placement Rectangle

In the figure, ScreenPlacementRect is the Fuchsia colored rectangle of the Show popup button.

See Also