Form#

Qualified name: delphifmx.Form

class Form#

Bases: CustomForm

TForm represents a standard FireMonkey application window (form). When you create forms in the Form designer at design time, they are implemented as descendants of TForm. Forms can represent the application’s main window, or dialog boxes or various preferences-related windows. A form can contain any other FireMonkey objects, such as TButton, TCheckBox, TComboBox objects, and so on.

Methods

LoadProps

Load properties from a .pydfm file

Attributes

Action

Specifies the action associated with the control.

ActionClient

Specifies whether the component object has an associated action.

Active

Specifies whether the form has focus.

ActiveControl

Specifies the active control on the form.

BiDiMode

Indicates the layout of this form when running under Middle Eastern versions of the operating system.

Border

Embarcadero Technologies does not currently have any additional information.

BorderIcons

Specifies which icons appear on the title bar of the form.

BorderStyle

Specifies the appearance and behavior of the form border.

Bounds

Bounds of form - position and size.

BoundsF

Embarcadero Technologies does not currently have any additional information.

Canvas

Provides access to the drawing area of the form.

Caption

Specifies a text string that identifies the form to the user.

Captured

Specifies the control that has captured the mouse.

Children

Stores an array of children attached to this parent component.

ChildrenCount

Read-only property that specifies the number of children in the children list.

ClassName

Returns the TObject.ClassName

ClientHeight

Specifies the height (in pixels) of the form's client area.

ClientWidth

Specifies the width (in pixels) of the form's client area.

ComObject

Specifies the interface reference implemented by the component.

ComponentCount

Indicates the number of components owned by the component.

ComponentIndex

Indicates the position of the component in its owner's Components property array.

ComponentState

Describes the current state of the component, indicating when a component needs to avoid certain actions.

ComponentStyle

Governs the behavior of the component.

Components

<Delphi indexed property Components of type TComponent at 1619D745CD0>

Constraints

Embarcadero Technologies does not currently have any additional information.

Cursor

Specifies the mouse cursor that will be used on this form.

Data

Stores a Tvalue, which is a data structure that can store different kinds of data types.

DesignInfo

Contains information used by the Form designer.

Designer

Specifies the designer interface for the form.

Fill

Specifies the way the background on this form is filled.

Focused

Specifies the control that has the focus set on it.

FormFactor

width, height, orientations, and devices.

FormFamily

Is a string property that specifies the form family this form is part of.

FormState

Indicates transitional state information about the form.

FormStyle

Determines the form style.

FullScreen

Indicates whether the form is in fullscreen mode.

Handle

Specifies the handle of this form.

Height

Specifies the vertical size of the form (in pixels).

Hovered

Identifies the control over which the mouse pointer is hovering.

Index

Specifies the index of the child object in the children array attached to this object.

Left

Specifies the X coordinate of the upper-left corner of the form, relative to the screen.

ModalResult

Represents the return value of a form that is used as a modal dialog box.

Name

Specifies the name of the component as referenced in code.

Observers

Indicates the TObservers object added to the TComponent.

OnActivate

<Delphi property OnActivate of type TForm at 1619DD8A4F0>

OnClose

<Delphi property OnClose of type TForm at 1619DD8A690>

OnCloseQuery

<Delphi property OnCloseQuery of type TForm at 1619DD8A760>

OnConstrainedResize

<Delphi property OnConstrainedResize of type TForm at 1619DD8AF80>

OnCreate

<Delphi property OnCreate of type TForm at 1619DD8A5C0>

OnDeactivate

<Delphi property OnDeactivate of type TForm at 1619DD8A830>

OnDestroy

<Delphi property OnDestroy of type TForm at 1619DD8A900>

OnFocusChanged

<Delphi property OnFocusChanged of type TForm at 1619DD8B2C0>

OnGesture

<Delphi property OnGesture of type TForm at 1619DD8B600>

OnHide

<Delphi property OnHide of type TForm at 1619DD8B1F0>

OnKeyDown

<Delphi property OnKeyDown of type TForm at 1619DD8A9D0>

OnKeyUp

<Delphi property OnKeyUp of type TForm at 1619DD8AAA0>

OnMouseDown

<Delphi property OnMouseDown of type TForm at 1619DD8AB70>

OnMouseMove

<Delphi property OnMouseMove of type TForm at 1619DD8AC40>

OnMouseUp

<Delphi property OnMouseUp of type TForm at 1619DD8AD10>

OnMouseWheel

<Delphi property OnMouseWheel of type TForm at 1619DD8ADE0>

OnPaint

<Delphi property OnPaint of type TForm at 1619DD8B050>

OnResize

<Delphi property OnResize of type TForm at 1619DD8AEB0>

OnSaveState

<Delphi property OnSaveState of type TForm at 1619DD8B6D0>

OnShow

<Delphi property OnShow of type TForm at 1619DD8B120>

OnTap

<Delphi property OnTap of type TForm at 1619DD8B7A0>

OnTouch

<Delphi property OnTouch of type TForm at 1619DD8B870>

OnVirtualKeyboardHidden

<Delphi property OnVirtualKeyboardHidden of type TForm at 1619DD8B460>

OnVirtualKeyboardShown

<Delphi property OnVirtualKeyboardShown of type TForm at 1619DD8B390>

OriginalContainerSize

Embarcadero Technologies does not currently have any additional information.

Owner

Indicates the component that is responsible for streaming and freeing this component.

Padding

Specifies the padding of the form.

Parent

Returns/Sets the Control Visibility

ParentForm

Specifies the parent form of this form.

Position

Represents the size and placement of the form.

Quality

Embarcadero Technologies does not currently have any additional information.

Root

Specifies the root parent of this object.

SaveState

Specifies the save state of the FireMonkey form.

ShowFullScreenIcon

Indicates whether the Mac fullscreen icon is visible.

ShowHint

Determines whether help hints are enabled or disabled for first level child controls in the form. For more information about the rules for enabling hints for a control, see Using Hints to Show Contextual Help in a FireMonkey Application. TCommonCustomForm.ShowHint is a Boolean property set as True by default. When you place a child control in the form, and set the TControl.Hint property, the hint is displayed because the TControl.ParentShowHint is True by default. If the TCommonCustomForm.ShowHint property of the form is set to False, the hint is not displayed in the child control. To show the hint for a control, even when the TCommonCustomForm.ShowHint property of the form is set to False, set TControl.ShowHint for the control to True.

Stored

Specifies whether this object is stored in the .XFM file.

StyleBook

Specifies the style book for this form.

StyleLookup

Specifies the name of the style to look up and apply to this form.

StyleName

Specifies the style name for this FMX component.

SystemStatusBar

System status bar settings on mobile platforms.

Tag

Stores a NativeInt integral value as a part of a component.

TagFloat

Custom property that stores any floating-point value.

TagObject

Custom property that stores any object value.

TagString

Custom property that stores any string value.

Top

Specifies the Y coordinate of the upper-left corner of the form, relative to the screen.

Touch

Embarcadero Technologies does not currently have any additional information.

Transparency

Indicates whether the form is transparent or not.

VCLComObject

Represents information used internally by components that support COM.

Visible

Indicates whether the form is visible.

Width

Specifies the horizontal size of the form (in pixels).

WindowState

Represents how the form appears on the screen.

WindowStyle

Embarcadero Technologies does not currently have any additional information.

Action#

Specifies the action associated with the control. Action allows an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an OnClick event). If an object of the descendant from the TFmxObject class does not support actions, and when this object tries to assign a value to the Action property, the setter method for Action calls GetActionLinkClass that should return nil. In this case, attempting to set a value to the Action property raises the following exception:

StrEActionNoSuported = ‘Class %s does not support the action’

ActiveControl#

Specifies the active control on the form. Use ActiveControl to get or set the active control (having the focus) on the form. Only one control can have the focus at a given time, in an application. If the form does not have the focus, ActiveControl is the control, on the form, that receives the focus when the form itself receives the focus.

BiDiMode#

Indicates the layout of this form when running under Middle Eastern versions of the operating system. Use BiDiMode to specify the bi-directional mode for the application. The bi-directional mode controls the direction in which text appears (left-to-right or right-to-left), the placement of vertical scroll bars, and the default alignment of text when the application runs in Middle Eastern locales.

Border#

Embarcadero Technologies does not currently have any additional information.

BorderIcons#

Specifies which icons appear on the title bar of the form. Use BorderIcons to get or set the icons that appear on the title bar of the form. BorderIcons can include any of the following TBorderIcons values:

Value

Meaning

biSystemMenu

The form has a Control menu (also known as a System menu).

biMinimize

The form has a Minimize button.

biMaximize

The form has a Maximize button.

biHelp

Has no effect in FireMonkey.

BorderStyle#

Specifies the appearance and behavior of the form border. Use BorderStyle to get or set the appearance and behavior of the form border. BorderStyle can be any of the following TFmxFormBorderStyle values:

Value

Meaning

Single

Not resizable; minimize/maximize menu

None

Not resizable; no visible border line

Sizeable

Standard resizable border

ToolWindow

Similar to Single, but with a smaller caption

SizeToolWin

Similar to Sizeable, but with a smaller caption

Notes:

In iOS applications, None makes your form run in fullscreen mode. With any other value, your iOS app shows the iOS status bar. In Android applications, the BorderStyle property does not control fullscreen display. Instead, you should set the theme property on the Project > Options > Version Info page of your Android project: Setting the theme = TitleBar means that your Android app includes a title or status bar. Setting the theme = NoTitleBar means that your Android app runs in fullscreen mode, without a title or status bar.

Caption#

Specifies a text string that identifies the form to the user. Use Caption to specify the text string that labels the form, identifying it to the user.

ClientHeight#

Specifies the height (in pixels) of the form’s client area. Use ClientHeight to determine the height (in pixels) of the form’s client area. The client area is the usable area inside the form’s border, excluding the title bar, scroll bars, and so on. Set ClientHeight to change the height of the form’s window based on the desired client area. To change the height of the form’s window based on the total size of the window (including the border, menu, status bar and so on), use the Height property instead.

ClientWidth#

Specifies the width (in pixels) of the form’s client area. Use ClientWidth to determine the width (in pixels) of the form’s client area. The client area is the usable area inside the form’s border. Set ClientWidth to change the width of the form’s window based on the desired client area. To change the width of the form’s window based on the total size of the window (including the border, status bar, and so on), use the Width property instead.

Constraints#

Embarcadero Technologies does not currently have any additional information.

Cursor#

Specifies the mouse cursor that will be used on this form.

Fill#

Specifies the way the background on this form is filled. Use Fill to get or set the brush that defines the way the background of this form is painted (gradient, solid, and so on).

Tip: Using a brush for Fill overrides the functionality of the Transparency property.

FormFactor#

width, height, orientations, and devices.

Type:

Specifies the form factor for this FireMonkey form, that is, the TFormFactor properties

FormFamily#

Is a string property that specifies the form family this form is part of. The logic can choose a different form as the main form depending on size, if an app has several forms with the same .FormFamily value as the app’s main form.

FormStyle#

Determines the form style. FormStyle is one of the Normal, Popup, or StayOnTop values defined in TFormStyle.

FullScreen#

Indicates whether the form is in fullscreen mode. Use FullScreen to specify whether the form is in fullscreen mode.

Height#

Specifies the vertical size of the form (in pixels). Use the Height property to read or change the height of the form.

Left#

Specifies the X coordinate of the upper-left corner of the form, relative to the screen. Use Left to locate the top of the form or reposition the form to a different X coordinate. The Left property, like the Top property, is the position of the form relative to its container (the screen), in pixels.

LoadProps()#

Load properties from a .pydfm file

OnActivate#

<Delphi property OnActivate of type TForm at 1619DD8A4F0>

OnClose#

<Delphi property OnClose of type TForm at 1619DD8A690>

OnCloseQuery#

<Delphi property OnCloseQuery of type TForm at 1619DD8A760>

OnConstrainedResize#

<Delphi property OnConstrainedResize of type TForm at 1619DD8AF80>

OnCreate#

<Delphi property OnCreate of type TForm at 1619DD8A5C0>

OnDeactivate#

<Delphi property OnDeactivate of type TForm at 1619DD8A830>

OnDestroy#

<Delphi property OnDestroy of type TForm at 1619DD8A900>

OnFocusChanged#

<Delphi property OnFocusChanged of type TForm at 1619DD8B2C0>

OnGesture#

<Delphi property OnGesture of type TForm at 1619DD8B600>

OnHide#

<Delphi property OnHide of type TForm at 1619DD8B1F0>

OnKeyDown#

<Delphi property OnKeyDown of type TForm at 1619DD8A9D0>

OnKeyUp#

<Delphi property OnKeyUp of type TForm at 1619DD8AAA0>

OnMouseDown#

<Delphi property OnMouseDown of type TForm at 1619DD8AB70>

OnMouseMove#

<Delphi property OnMouseMove of type TForm at 1619DD8AC40>

OnMouseUp#

<Delphi property OnMouseUp of type TForm at 1619DD8AD10>

OnMouseWheel#

<Delphi property OnMouseWheel of type TForm at 1619DD8ADE0>

OnPaint#

<Delphi property OnPaint of type TForm at 1619DD8B050>

OnResize#

<Delphi property OnResize of type TForm at 1619DD8AEB0>

OnSaveState#

<Delphi property OnSaveState of type TForm at 1619DD8B6D0>

OnShow#

<Delphi property OnShow of type TForm at 1619DD8B120>

OnTap#

<Delphi property OnTap of type TForm at 1619DD8B7A0>

OnTouch#

<Delphi property OnTouch of type TForm at 1619DD8B870>

OnVirtualKeyboardHidden#

<Delphi property OnVirtualKeyboardHidden of type TForm at 1619DD8B460>

OnVirtualKeyboardShown#

<Delphi property OnVirtualKeyboardShown of type TForm at 1619DD8B390>

Padding#

Specifies the padding of the form. The Padding of a form specifies how close, in pixels, the child of the form can come to each of its edges (top, left, bottom, right). Padding adds space to the inner side of the form. The child of the form is repositioned and resized, if necessary, to fit the Padding.

Parent#

Returns/Sets the Control Visibility

Position#

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

Quality#

Embarcadero Technologies does not currently have any additional information.

ShowFullScreenIcon#

Indicates whether the Mac fullscreen icon is visible. Use ShowFullScreenIcon to specify whether the Mac fullscreen icon or is visible.

Note: ShowFullScreenIcon has no visible effect in Windows.

ShowHint#

Determines whether help hints are enabled or disabled for first level child controls in the form. For more information about the rules for enabling hints for a control, see Using Hints to Show Contextual Help in a FireMonkey Application.

TCommonCustomForm.ShowHint is a Boolean property set as True by default. When you place a child control in the form, and set the TControl.Hint property, the hint is displayed because the TControl.ParentShowHint is True by default.

If the TCommonCustomForm.ShowHint property of the form is set to False, the hint is not displayed in the child control. To show the hint for a control, even when the TCommonCustomForm.ShowHint property of the form is set to False, set TControl.ShowHint for the control to True.

StyleBook#

Specifies the style book for this form. For more information on how to customize the looks of a FireMonkey application with styles, refer to the Customizing FireMonkey Applications with Styles help topic.

StyleLookup#

Specifies the name of the style to look up and apply to this form. The FireMonkey Component Design help topic shows, among other useful things related to component designing, how to apply a style to a TPanel component.

SystemStatusBar#

System status bar settings on mobile platforms.

Top#

Specifies the Y coordinate of the upper-left corner of the form, relative to the screen. Use Top to locate the top of the form or reposition the form to a different Y coordinate. The Top property, like the Left property, is the position of the form relative to its container (the screen), in pixels.

Touch#

Embarcadero Technologies does not currently have any additional information.

Transparency#

Indicates whether the form is transparent or not. Use Transparency to determine whether the form is displayed as a totally transparent one. However, note that in this situation, all the controls will not be transparent and will be displayed normally. Only the form’s background will be set to a transparent state. If you set Transparency to True, the form will not display its title bar, nor its border. This means that you need to apply programmatic methods (involving setting of the Top and Left properties) to move the form on the screen surface.

Visible#

Indicates whether the form is visible. Use Visible to determine whether the form is visible. If Visible is True, the form is visible unless it is completely obscured by other forms. If Visible is False, the form is not visible. The Show and ShowModal methods set Visible to True and bring the form to the front of all open windows.

Width#

Specifies the horizontal size of the form (in pixels). Use the Width property to read or change the width of the form.

WindowState#

Represents how the form appears on the screen. Set WindowState to minimize, maximize, or restore the form window. Read WindowState to determine whether the form is minimized, maximized, or in a normal state. Possible values for the WindowState property are:

wsMaximized wsMinimized wsNormal