Control¶
Qualified name: delphifmx.Control
- class Control¶
Bases:
FmxObject
TControl is the base class for FMX on-screen components. Subclasses are roughly divided into primitive shapes and styleable controls. TControl extends TFmxObject to present objects that are seen, by adding properties and methods for:
Size and position Margins and padding Alignment with others Visibility, opacity, scale, and rotation Mouse interaction and hit testing Keyboard interaction Focus and tab order Triggers for animations and effects Painting
Methods
Converts the screen coordinates of a specified point on the screen to client coordinates.
Transforms and returns a specified vector from the absolute perspective to the local perspective.
Applies the specified mouse trigger effect to all the children of this FMX object that are of type TEffect.
Marks the start of an update session of the control and its children.
Puts the control in front of all other controls in its parent control.
Indicates whether a control can receive focus.
Embarcadero Technologies does not currently have any additional information.
Embarcadero Technologies does not currently have any additional information.
Marks the end of an update session of the control and its children.
Loops through the controls that are children of this control, and runs the specified procedure once per control, with a different control as the first parameter in each call.
Embarcadero Technologies does not currently have any additional information.
Adds a rectangle to the update region of the scene.
Returns True if this control is in the middle of one or more update sessions.
Translates a given point from client area coordinates to global screen coordinates.
Transforms and returns a specified vector from the local perspective to the absolute perspective.
Transforms and returns a specified point from the local perspective to the screen perspective.
Locks the current control, so it cannot be changed at design time.
Takes and returns a screenshot of the control.
Paints the current control to a specified canvas.
Checks whether the point, specified by the absolute coordinates, belongs to the control area.
Checks whether the point specified by local coordinates belongs to the control area.
Prepares the current control for painting.
Forces the current control to recalculate the AbsoluteMatrix property.
Recalculates AbsoluteMatrix.
Forces the current control to recalculate its enabled state.
Forces the current control to recalculate its HasClipParent property.
Forces the current control to recalculate its HasEffect property.
Forces the current control to recalculate its Opacity property.
Embarcadero Technologies does not currently have any additional information.
Forces the current control to recalculate its UpdateRect property.
Forces the control to repaint its image on the screen.
Removes the focus from a control of from any children of the control.
Transforms and returns a specified point from the screen perspective to the local perspective.
Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls.
Sets the Left, Top, Width, and Height properties all at once.
Gives the input focus to the control.
Sets a new Scene for the current control.
Indicates whether a control should be ignored in ObjectAtPoint.
Embarcadero Technologies does not currently have any additional information.
Embarcadero Technologies does not currently have any additional information.
Embarcadero Technologies does not currently have any additional information.
Updates the effects of the current control and of the control's parent.
Attributes
Specifies the absolute rectangle of the control after all its parent controls clip it.
Specifies whether the control is absolutely enabled.
Specifies the absolute height of the control.
Specifies the absolute transformation matrix of the control.
Specifies the absolute opacity of the control.
Specifies the absolute rectangle that bounds the control.
Specifies the absolute scale of the control.
Specifies the absolute width of the control.
ActionClient
Specifies whether the component object has an associated action.
Specifies the alignment options (top, left, client, and so on) of this control.
Specifies how the control is anchored to its parent.
A flag that signals when a control is in the process of applying an effect.
Specifies whether the control captures mouse events.
A TRectF defined by the width and height of the control.
Specifies the bounding rectangle of the control.
Specifies whether the parent of this control should be evaluated to receive focus.
Provides the drawing surface of the control.
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.
Specifies the bigger rectangle area occupied by parent and children controls.
ClassName
Returns the TObject.ClassName
Specifies if children of the control should be clipped to the control's on-screen region.
Specifies whether the current control has clipped its parent.
Specifies the bound rectangle to be clipped.
ComObject
Specifies the interface reference implemented by the component.
ComponentCount
Returns the owned component count
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
Returns an iterator over the owned components
Returns an iterator over contained controls
Returns the count of contained controls
Image to use to represent the mouse pointer when it passes into the region covered by the control.
Data
Stores a Tvalue, which is a data structure that can store different kinds of data types.
Embarcadero Technologies does not currently have any additional information.
DesignInfo
Contains information used by the Form designer.
Embarcadero Technologies does not currently have any additional information.
Specifies whether the control has the focus effect disabled.
Specifies how the control initiates drag-and-drop operations.
Specifies whether the control is highlighted when the dragged object is over it.
Specifies whether the control responds to mouse, keyboard, and timer events.
Embarcadero Technologies does not currently have any additional information.
Specifies whether the control has an effect that is applied after the control is painted.
Control that is a direct child of this control and has clipped this control.
Specifies whether the control's effect is painted.
Specifies whether the control has an applied effect.
Height specifies the vertical size of the control (in dp).
Specifies the text string that appears when the user moves the mouse over a control.
Enables the control to capture mouse events.
Specifies whether the control is currently being painted.
Index
Specifies the index of the child object in the children array attached to this object.
Image used to represent the mouse pointer when it passes into the region covered by the control.
Specifies the inverse matrix of AbsoluteMatrix.
Specifies whether a dragged object is over the area of the current control.
Determines whether the control has input focus.
Whether the current style of this control has been actually applied to the control.
Specifies whether the mouse cursor is over the control.
Specifies whether the control is visible.
Specifies the local rectangle for painting the control.
Specifies whether the control is locked at design time.
Aligns the component to the margins points of other components.
Name
Specifies the name of the component as referenced in code.
Observers
Indicates the TObservers object added to the TComponent.
Callable[[Object, GestureEventInfo, bool], None]:
Specifies the control opacity.
Owner
Returns the Component Owner
Aligns the component to the padding points of other components.
Parent
Returns/Sets the Control Visibility
Specifies the parent control of this control.
Specifies the bounding rectangle of the control within its parent.
Specifies whether all the control's parents are visible.
Specifies the context (pop-up) menu object.
Returns an access to the position of the control inside its parent
Indicates whether the control is currently pressed.
A point that indicates where exactly on the control the click occured.
Root
Specifies the root parent of this object.
Specifies the current scene in which the control is drawn.
Specifies whether the Hint can be shown.
Specifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
Stored
Specifies whether this object is stored in the .XFM file.
StyleName
Specifies the style name for this FMX component.
Indicates the position of the control in its parent's tab order.
Embarcadero Technologies does not currently have any additional information.
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.
Specifies the touch manager component associated with the control.
Set of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
Specifies the rectangle area of the control that needs to be updated.
VCLComObject
Represents information used internally by components that support COM.
Returns/Sets the Control Visibility
Specifies the horizontal size of the control (in pixels).
- AbsoluteClipRect¶
Specifies the absolute rectangle of the control after all its parent controls clip it.
- Type:
- AbsoluteEnabled¶
Specifies whether the control is absolutely enabled. AbsoluteEnabled is True only if Enabled is True and the parent also reports AbsoluteEnabled as True. Therefore, this logic climbs the parent hierarchy to determine whether the control is truly enabled or not. If Parent is set and the parent’s AbsoluteEnabled property is False, AbsoluteEnabled is set to False, otherwise it has the value of the Enabled property.
- Type:
bool
- AbsoluteHeight¶
Specifies the absolute height of the control. Usually, it has the same value as the Height property. The value can be affected by the transformations applied over the control.
- Type:
float
- AbsoluteMatrix¶
Specifies the absolute transformation matrix of the control. AbsoluteMatrix is calculated using FLocalMatrix and AbsoluteMatrix of its parent. The calculation only takes place if FRecalcAbsolute is True and the result is then cached in the FAbsoluteMatrix field. If the calculation is not taking place during an update session and InPaintTo is not set, it initiates Repaint. AbsoluteMatrix is used when the control is painted or needs to be repainted.
- Type:
Matrix
- AbsoluteOpacity¶
Specifies the absolute opacity of the control. If the control has another TControl as parent, AbsoluteOpacity depends on the absolute opacity of its parent. To explicitly set the opacity of a control, use the Opacity property.
- Type:
float
- AbsoluteRect¶
Specifies the absolute rectangle that bounds the control. It returns the bounding rectangle of the control in absolute coordinates (relative to the main form).
- Type:
- AbsoluteScale¶
Specifies the absolute scale of the control. The absolute scale of a control is the scale relative to the scale of its parent. AbsoluteScale is kept as a TPointF. The X coordinate is the scale for the X axis and Y is the scale for the Y axis.
- Type:
- AbsoluteToLocal()¶
Converts the screen coordinates of a specified point on the screen to client coordinates.
- AbsoluteToLocalVector(Vector: Vector) Vector ¶
Transforms and returns a specified vector from the absolute perspective to the local perspective. Use AbsoluteToLocalVector to get the transposed coordinates of a vector from the absolute context to the local context of the current control. The absolute context for a control is the parent form area, and the local context is the control area. P is the vector to be transformed. AbsoluteToLocalVector returns the transformed vector. To have the inverse effect over a point, use LocalToAbsoluteVector.
- AbsoluteWidth¶
Specifies the absolute width of the control. Usually, it has the same values as the Width property. The value can be affected by the transformations applied over the control.
- Type:
float
- Align¶
Specifies the alignment options (top, left, client, and so on) of this control. Use Align to automatically set the alignment of the current control. Setting Align to a value different than None can affect the position, size (height and width), and anchors of the control. By default, Align is set to None. Descendants of TControl typically set the visibility and value for the Align property. For example, for TToolBar, Align defaults to TAlignLayout.Top. To see the possible values for Align and their visible effects over the control, see FMX.Types.TAlignLayout. Controls that have the Align or Anchors properties set can use a Scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
AlignLayout
- Anchors¶
Specifies how the control is anchored to its parent. Use Anchors to ensure that a control maintains its current position relative to the edges of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. Anchors is enforced only when the parent control is resized. If a control is anchored to opposite edges at the same time, the control stretches horizontally or vertically to maintain constant the distance between the control edges and parent edges. If a control is anchored to all four edges of its parent, the control stretches in all directions. By default, a control is anchored to the top and left edges of its container (Anchors=[akTop,akLeft]). The automatic alignment may affect the anchors of a control. When Align is set to None, all the anchors are available. If Align is not None, the anchors affected by the automatic alignment are excluded. Changing the state of the anchors affected by the automatic alignment has no effect over the control. Controls that have the Align or Anchors properties set can use a Scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
Anchors
- ApplyTriggerEffect(AInstance: FmxObject, ATrigger: str) None ¶
Applies the specified mouse trigger effect to all the children of this FMX object that are of type TEffect. ApplyTriggerEffect iterates through all the children of this FMX object and, if one of them is of type TEffect, applies the mouse trigger given through the ATrigger parameter (which can be ‘IsMouseOver’, ‘IsMouseOver’, ‘IsDragOver’, and so on). AInstance specifies the instance of the FMX object to which the trigger effect is applied.
- ApplyingEffect¶
A flag that signals when a control is in the process of applying an effect. The ApplyEffect method uses this flag to correctly render a control.
- Type:
bool
- AutoCapture¶
Specifies whether the control captures mouse events. When a control captures the mouse, all subsequent mouse events go to that control until the user releases the mouse button.
- Type:
bool
- AxisAlignedRect¶
A TRectF defined by the width and height of the control. This TRectF is normalized. DoGetUpdateRect uses this property.
- Type:
- BeginUpdate()¶
Marks the start of an update session of the control and its children. It increases the value of the FUpdating semaphore. A call to BeginUpdate must be complemented by calls to EndUpdate after the update is finished. FUpdating is an internal semaphore used to mark the process of control updating. Painting of a control is disabled while FUpdating is higher than 0.
- BoundsRect¶
Specifies the bounding rectangle of the control. The coordinates of the upper-left corner of the bounding rectangle are X and Y coordinates of the control Position. The coordinates of the lower-right corner are X+Width and Y+Height. For example:
R:=Control.BoundsRect;
The coordinates of the R rectangle are:
R.Left = Control.Position.X; R.Top = Control.Position.Y; R.Right = Control.Position.X + Control.Width; R.Bottom = Control.Position.Y + Control.Height;
When BoundsRect is set, the Position property is set to be the upper-left corner of the given bound rectangle, and the Width and Height of the control receive the values of the width and height of the given bound rectangle. For example:
Control.BoundsRect:=R;
The controls have the following properties:
Control.Position.X= R.Left; Control.Position.Y= R.Top; Control.Width= R.Width; Control.Height= R.Height;
- Type:
- BringToFront()¶
Puts the control in front of all other controls in its parent control.
- CanFocus()¶
Indicates whether a control can receive focus.
- CanParentFocus¶
Specifies whether the parent of this control should be evaluated to receive focus. CanParentFocus is True when the parent of this control should be evaluated to receive focus if this control cannot receive focus itself, and False otherwise.
- Type:
bool
- Canvas¶
Provides the drawing surface of the control. Canvas defines an area within which you can explicitly position child elements by using coordinates that are relative to the drawing area. For more details, see TCanvas.
- Type:
Canvas
- ChildrenRect¶
Specifies the bigger rectangle area occupied by parent and children controls. ChildrenRect is a rectangle obtained by performing a union operation between the rectangles occupied by the parent control and the children controls.
Use the ChildrenRect.Width property on the parent, to obtain the width of the rectangle. Use the ChildrenRect.Height property on the parent, to obtain the height of the rectangle. Note: They are read-only properties.
- Type:
- ClipChildren¶
Specifies if children of the control should be clipped to the control’s on-screen region. Set ClipChildren to
True if you want child controls to be clipped to the control’s on-screen region. False if you want child controls to be able to extend beyond the region of the parent control.
- Type:
bool
- ClipParent¶
Specifies whether the current control has clipped its parent. When ClipParent is True, TControl cuts off the portion of the parent that lies under the control when the control is painted by the Paint and Painting methods. Parts of the control that do not contain visible objects cut off holes in the parent’s image. ClipParent is ignored in PaintChildren and other painting methods. If one parent has more that one child control having ClipParent equals True, then only one of these child controls is painted with ClipParent equals True. Others child controls are painted as if ClipParent equals False.
- Type:
bool
- ClipRect¶
Specifies the bound rectangle to be clipped. The values of ClipRect are specified by:
Left and Top, equal to 0. Right, equal to Width. Bottom, equal to Height.
- Type:
- Controls¶
Returns an iterator over contained controls
- ControlsCount¶
Returns the count of contained controls
- ConvertLocalPointFrom(AControl: Control, AControlLocalPoint: PointF) PointF ¶
Embarcadero Technologies does not currently have any additional information.
- ConvertLocalPointTo(AControl: Control, ALocalPoint: PointF) PointF ¶
Embarcadero Technologies does not currently have any additional information.
- Cursor¶
Image to use to represent the mouse pointer when it passes into the region covered by the control. Change the value of Cursor to provide feedback to the user when the mouse pointer enters the control. For a list of cursor constants, see System.UITypes Constants. The image representations of the cursor depend on the theme active on the current platform. If Cursor is set to the default cursor, this control might display a different cursor when the mouse pointer is over it. The actual cursor that this control displays is the cursor defined in InheritedCursor, a read-only property that is calculated based not only in the value of Cursor in this control, but also the value of Cursor in any ancestor of this control (parent, grand-parent, and so on until the parent form).
- Type:
int
- DefaultSize¶
Embarcadero Technologies does not currently have any additional information.
- Type:
- DisableDisappear¶
Embarcadero Technologies does not currently have any additional information.
- Type:
bool
- DisableFocusEffect¶
Specifies whether the control has the focus effect disabled. Set DisableFocusEffect to True so the control disables the effect applied when it receives focus. Usually, DisableFocusEffect for FireMonkey controls is False.
- Type:
bool
- DragMode¶
Specifies how the control initiates drag-and-drop operations. Use DragMode to control when the user can drag the control. Disable the drag-and-drop capability at run time by setting the DragMode property value to dmManual. Enable automatic dragging by setting DragMode to dmAutomatic.
- Type:
DragMode
- EnableDragHighlight¶
Specifies whether the control is highlighted when the dragged object is over it.
- Type:
bool
- Enabled¶
Specifies whether the control responds to mouse, keyboard, and timer events. Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to False. Some disabled controls appear dimmed (for example: buttons, check boxes, labels), while others (container controls) simply lose their functionality without changing their appearance. If Enabled is set to False, the control ignores mouse, keyboard, and timer events. To re-enable a control, set Enabled to True. This property applies to all TControl descendants.
- Type:
bool
- EndUpdate()¶
Marks the end of an update session of the control and its children. The update session must be started first by calling BeginUpdate. EndUpdate decreases the FUpdating semaphore. If all update sessions end and FUpdating is 0, EndUpdate invokes Realign to process layout changes.
- EnumControls(Proc: Func<FMX.Controls.TControl, FMX.Types.TEnumProcResult>) None ¶
Loops through the controls that are children of this control, and runs the specified procedure once per control, with a different control as the first parameter in each call.
Warning: EnumControls is deprecated as a function. You should use it as a procedure instead. This page describes the syntax and use of the EnumControls procedure. EnumControls loops not only through direct children of this control, but also through their children (grand-children), and so on, using a depth-first search algorithm. Each time EnumControls visits a control during the search, it executes the Proc procedure. This procedure receives the visited control as argument, and it returns a value of type TEnumControlsResult. The return value defines what EnumControls does next. You may return any of the following values:
Continue lets EnumControls keep searching the controls as usual. Discard makes the search skip the children of the current control (the control in the first parameter), as well as their children (grand-children) and so on. Stop interrupts the search loop. If EnumControls were a language-level control loop, Stop would be the Break keyword. Example The following is an example call to EnumControls that loops through the children of a panel (Panel1) and fills a list (ListOfVisibleControls) with all the controls that are visible:
In Delphi:
- Panel1.EnumControls(function (Control: TControl): TEnumControlsResult
- begin
- if not Control.Visible then
Result := TEnumControlsResult.Discard
- else
- begin
ListOfVisibleControls.Add(Control); Result := TEnumControlsResult.Continue;
end;
end);
In C++:
1. Define a class that implements the TFunc__2 interface: class TMethodReference : public TCppInterfacedObject<TFunc__2<TControl*,TEnumControlsResult> > { public:
TEnumControlsResult __fastcall Invoke(TControl* Control) {
- if (!Control->Visible)
return TEnumControlsResult::Discard;
- else {
TForm2::ListOfVisibleControls->Add(Control); return TEnumControlsResult::Continue;
}
}
};
2. Then pass an instance of this class to EnumControls: Panel1->EnumControls(new TMethodReference);
- FlipChildren(AAllLevels: bool) None ¶
- GetTabList()¶
Embarcadero Technologies does not currently have any additional information.
- HasAfterPaintEffect¶
Specifies whether the control has an effect that is applied after the control is painted. HasAfterPaintEffect is True if the control has an effect that is applied after the control is painted, and False otherwise.
- Type:
bool
- HasClipParent¶
Control that is a direct child of this control and has clipped this control.
- Type:
- HasDisablePaintEffect¶
Specifies whether the control’s effect is painted. HasDisablePaintEffect is True if the control has disabled the painting effect, and False otherwise.
- Type:
bool
- HasEffect¶
Specifies whether the control has an applied effect. HasEffect is False if an effect was applied to the control, and True otherwise.
- Type:
bool
- Height¶
Height specifies the vertical size of the control (in dp). Use the Height property to read or change the height of the control.
- Type:
float
- Hint¶
Specifies the text string that appears when the user moves the mouse over a control. See Using Hints to Show Contextual Help in a FireMonkey Application for more information about hints.
- Type:
str
- HitTest¶
Enables the control to capture mouse events.
If you set HitTest to True, this control captures all mouse events. The example below shows the use of HitTest for an OnClick event. If you set HitTest to False, the mouse events will pass through this control, so that a control laid out behind this one receives the mouse events instead of this control. Note: The HitTest enables all mouse-related events, which also include the display of Hints and Hint-related events. For most controls, HitTest is True by default. However, this is not true for all the controls. For example, for TLabel and TPathLabel, HitTest is False by default; these two controls do not capture the mouse-related events unless you set HitTest to True.
Example of HitTest 1. On a form, place a TPanel component. 2. Inside the panel, place a TPathLabel component. 3. Implement the OnClick event for both the TPanel and the TPathLabel:
procedure TForm1.Panel1Click(Sender: TObject); begin
ShowMessage(‘OnClick event fired for TPanel’);
end;
procedure TForm1.PathLabel1Click(Sender: TObject); begin
ShowMessage(‘OnClick event fired for TPathLabel’);
end;
Set the TPathLabel HitTest property to False (this is the default setting). Run the application and click the label. The OnClick event is fired for the panel (not the label).
Set the TPathLabel HitTest property to True. Run the application and click the label. The OnClick event is fired for the TPathLabel.
- Type:
bool
- InPaintTo¶
Specifies whether the control is currently being painted. InPaintTo is True if the current control is being painted.
- Type:
bool
- InheritedCursor¶
Image used to represent the mouse pointer when it passes into the region covered by the control. The value of the read-only InheritedCursor property is the value of the Cursor property unless Cursor has the default value, in which case InheritedCursor contains the first non-default InheritedCursor value of its ancestors (parent, grand-parent, and so on until the parent form). If every ancestor of this control has InheritedCursor set to the default value, InheritedCursor has the default value in this control as well. Changing the value of Cursor in this control or in any ancestor of this control may affect the value of InheritedCursor in this control.
- Type:
int
- InvalidateRect(ARect: RectF) None ¶
Adds a rectangle to the update region of the scene. ARect specifies the rectangle to be invalidated. InvalidateRect transposes ARect to the local perspective and then adds it to the update region of the Scene.
- InvertAbsoluteMatrix¶
Specifies the inverse matrix of AbsoluteMatrix.
- Type:
Matrix
- IsDragOver¶
Specifies whether a dragged object is over the area of the current control. IsDragOver is True when the dragged object is over the current control. For effect triggers, setting IsDragOver to True triggers the effect when the dragged object is over the current control.
- Type:
bool
- IsFocused¶
Determines whether the control has input focus.
- IsInflated¶
Whether the current style of this control has been actually applied to the control. IsInflated is True if the current style of the control has been applied to the control. It is False otherwise. For example, if you change the style of a control at run time, IsInflated is False until the control is updated to show its new style.
- Type:
bool
- IsMouseOver¶
Specifies whether the mouse cursor is over the control. IsMouseOver is True when the mouse is passing over the control. For effect triggers, setting IsMouseOver to True triggers the effect while the mouse passes over the control.
- Type:
bool
- IsUpdating()¶
Returns True if this control is in the middle of one or more update sessions. It returns False otherwise.
- IsVisible¶
Specifies whether the control is visible. IsVisible is True when the control is visible. Use Visible in applications to allow write access. For effect triggers, setting IsVisible to True triggers the effect when the control is visible on the form.
- Type:
bool
- LocalRect¶
Specifies the local rectangle for painting the control. The coordinates of the upper-left corner of the rectangle are (0,0) and the coordinates of the bottom right corner are (Width, Height).
- Type:
- LocalToAbsolute()¶
Translates a given point from client area coordinates to global screen coordinates.
- LocalToAbsoluteVector(Vector: Vector) Vector ¶
Transforms and returns a specified vector from the local perspective to the absolute perspective. Use LocalToAbsoluteVector to get the transposed coordinates of a vector from the local context to the absolute context of the current control. The absolute context for a control is the parent form area, and the local context is the control area. P is the vector to be transformed. LocalToAbsoluteVector returns the transformed vector. To have the inverse effect over a vector, use AbsoluteToLocalVector.
- LocalToScreen(ALocalPoint: PointF) PointF ¶
Transforms and returns a specified point from the local perspective to the screen perspective. P is the point to be transformed. LocalToScreen is used internally when applying a certain placement.
- Lock()¶
Locks the current control, so it cannot be changed at design time. Lock also locks the current control’s children.
- Locked¶
Specifies whether the control is locked at design time. A locked control prohibits to move the control at design time, all the other properties can be modified at design time. To lock the control, set Locked to True. By default, Locked is False, and the control can be modified at design time.
- Type:
bool
- MakeScreenshot()¶
Takes and returns a screenshot of the control. MakeScreenshot creates a new TBitmap, draws on it the image of the current control by calling PaintTo, and returns it.
- Margins¶
Aligns the component to the margins points of other components. The Margins of a control are the distances (in pixels) from each edge (top, left, bottom, right) to another control within the same Parent or to the edge of its Parent. The Margins add space to the outer side of the control. It only applies for controls that do not use TAlignLayout None and the components are located to each other. If a margin is not 0, no other control will come closer to the control than the specified distance. If the distance from a Parent edge to the corresponding control edge is smaller than the specified Margins for that edge, the control is repositioned and resized, if necessary, to maintain the specified distance. If the Margins control has zero values, RAD Studio uses the default values (Left=4, Top=4, Right=4, Bottom=4). You can also set your own Margins values. It only applies to the IDE control’s guidelines, when you are dragging control. But if you use Align=Client (for example), it will use the specified values in Margins. The following image shows how Padding and Margins properties affect alignment, position, and size of controls.
- Type:
- OnGesture¶
Callable[[Object, GestureEventInfo, bool], None]:
- Opacity¶
Specifies the control opacity. Set Opacity to customize the transparency of the current control. Opacity takes values between 0 and 1. If Opacity is 1, the control is completely opaque; if it is 0, the control is completely transparent. The values over 1 are treated as 1, and the ones under 0 are treated as 0. Opacity applies to the control’s children.
- Type:
float
- Padding¶
Aligns the component to the padding points of other components. The Padding of a control specifies how close, in pixels, the control’s children can come to each of its edges (top, left, bottom, right). Padding adds space to the inner side of the control. The control’s children are repositioned and resized, if necessary, to maintain the Padding. If the Padding control has zero values, RAD Studio uses the default values (Left=4, Top=4, Right=4, Bottom=4). You can also set your own Padding values. The following image shows how Padding and Margins properties affect alignment, position, and size of controls.
Note: Padding constraints do not work for TScrollBox, TListBox, TTreeView, and TGrid based controls.
- Type:
- PaintTo(ACanvas: Canvas, ARect: RectF, AParent: FmxObject) None ¶
Paints the current control to a specified canvas. ACanvas specifies the canvas to draw on. ARect specifies the rectangle area of the ACanvas to draw on. AParent specifies the Parent of the control. By default, it is empty. PaintTo is called in the process of applying effects on the control in ApplyEffect, in which the control is first painted on the effect’s canvas using PaintTo and then the effect is processed. It is also used in MakeScreenshot in order to produce a screenshot bitmap. Descendants of TControl override PaintTo to provide specific rendering of the respective controls.
- ParentControl¶
Specifies the parent control of this control.
Tip: You cannot set the parent control of this control as the control itself (Self (Delphi) or this (C++Builder)).
- Type:
- ParentedVisible¶
Specifies whether all the control’s parents are visible. A control can be set to visible if all its parents are also visible. ParentedVisible returns True if the control’s parents are visible, and False otherwise.
- Type:
bool
- PointInObject(X: float, Y: float) bool ¶
Checks whether the point, specified by the absolute coordinates, belongs to the control area. PointInObject returns True if the specified point belongs to the control area, and False otherwise. The X and Y are the absolute coordinates (relative to the main form) of the point to be checked (compare with PointInObjectLocal):
X is the X coordinate. Y is the Y coordinate. The points of the control boundary specified by BoundsRect belong to the control and PointInObject returns True for them.
Note: PointInObject simply converts absolute coordinates of the point to local coordinates and calls PointInObjectLocal.
- PointInObjectLocal(X: float, Y: float) bool ¶
Checks whether the point specified by local coordinates belongs to the control area. PointInObjectLocal returns True if the specified point belongs to the control area, and False otherwise. The X and Y are the local coordinates of the point to be checked (compare with PointInObject):
X is the X coordinate. Y is the Y coordinate. The local coordinates of the upper-left corner of the control rectangle are (0,0), and the local coordinates of the lower-right corner are (Width, Height). The points of the control boundary specified by BoundsRect belong to the control and PointInObjectLocal returns True for them. If a control supports the Touch property, the control area can be optionally inflated on the values specified by the TouchTargetExpansion property. TouchTargetExpansion keeps four optional parameters representing the expansion for the four sides of the control in pixels (Bottom, Left, Right, and Top). The dclasses can change the ‘control area’ definition. For example:
The FMX.Objects.TSelection class extends the ‘control area’ definition relative to BoundsRect. FMX.Objects.TSelection.PointInObjectLocal also returns True if the point belongs to any of small rectangles of the four grip controls used to manage the selection shape. The rectangles of the grip controls are rectangles surrounding the four corners of the TSelection rectangle. The Width and Height of these rectangles are equal to 2 * GripSize. For example, the grip control’s rectangle of the upper-right corner UR_Corner of TSelection is defined by the following corners: (UR_Corner.Top - GripSize, UR_Corner.Right - GripSize)–upper-left corner of the grip. (UR_Corner.Top + GripSize, UR_Corner.Right + GripSize)–lower-right corner of the grip. FMX.Objects.TSelectionPoint.PointInObjectLocal returns True if the specified point belongs to the rectangle of the grip control corresponding to the TSelectionPoint object, and False otherwise.
- PopupMenu¶
Specifies the context (pop-up) menu object. Use PopupMenu to set the context menu of the current control. The pop-up window is displayed when ShowContextMenu is called.
- Type:
- Position¶
Returns an access to the position of the control inside its parent
- PrepareForPaint()¶
Prepares the current control for painting.
- Pressed¶
Indicates whether the control is currently pressed. Mouse action event handlers use this property as a flag to determine how to proceed in some cases.
- Type:
bool
- PressedPosition¶
A point that indicates where exactly on the control the click occured. MouseDown sets PressedPosition if Button is mbLeft.
- Type:
- RecalcAbsolute()¶
Forces the current control to recalculate the AbsoluteMatrix property. RecalcAbsolute also forces the control’s children to recalculate their AbsoluteMatrix.
- RecalcAbsoluteNow()¶
Recalculates AbsoluteMatrix. It is used in the painting process. Do not call RecalcAbsoluteNow in an application.
- RecalcEnabled()¶
Forces the current control to recalculate its enabled state. RecalcEnabled also forces the control’s children to recalculate their enabled state.
- RecalcHasClipParent()¶
Forces the current control to recalculate its HasClipParent property.
- RecalcHasEffect()¶
Forces the current control to recalculate its HasEffect property. RecalcHasEffect also forces the control’s parent to recalculate its HasEffect property.
- RecalcOpacity()¶
Forces the current control to recalculate its Opacity property. RecalcOpacity also forces the control’s children to recalculate their Opacity property.
- RecalcSize()¶
Embarcadero Technologies does not currently have any additional information.
- RecalcUpdateRect()¶
Forces the current control to recalculate its UpdateRect property. RecalcUpdateRect also forces the control’s parent–if necessary–and children to recalculate their UpdateRect property.
- Repaint()¶
Forces the control to repaint its image on the screen.
- ResetFocus()¶
Removes the focus from a control of from any children of the control.
- Scene¶
Specifies the current scene in which the control is drawn. The Scene of the control is also the scene of its children.
- Type:
IScene
- ScreenToLocal(AScreenPoint: PointF) PointF ¶
Transforms and returns a specified point from the screen perspective to the local perspective. P is the point to be transformed. ScreenToLocal is used internally.
- SendToBack()¶
Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls.
- SetBounds(Left, Top, Width, Height)¶
Sets the Left, Top, Width, and Height properties all at once.
- SetFocus()¶
Gives the input focus to the control.
- SetNewScene(AScene: IScene) None ¶
Sets a new Scene for the current control. AScene specifies the new scene. If AScene is empty, SetNewScene does nothing. SetNewScene sets the same scene for the control’s children.
- ShouldTestMouseHits()¶
Indicates whether a control should be ignored in ObjectAtPoint. False if the control should be ignored in ObjectAtPoint. ShouldTestMouseHits normally returns the same value as the value of Visible property of the control. TFrame overrides this method to allow itself to be painted in design time regardless of the value of its Visible property.
- ShowHint¶
Specifies whether the Hint can be shown. If ShowHint is set to True, a Hint string is displayed when the user moves the mouse over the control.
- Type:
bool
- ShowInDesigner()¶
Embarcadero Technologies does not currently have any additional information.
- Size¶
Specifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels). Use the Size property to read or change the size of the control.
- Type:
- StartTriggerAnimation(AInstance: FmxObject, ATrigger: str) None ¶
Embarcadero Technologies does not currently have any additional information.
- StartTriggerAnimationWait(AInstance: FmxObject, ATrigger: str) None ¶
Embarcadero Technologies does not currently have any additional information.
- TabOrder¶
Indicates the position of the control in its parent’s tab order. TabOrder is the order in which child controls are visited when the user presses the TAB key. The control with the TabOrder value of 0 is the control that has the focus when the form first appears. Initially, the tab order is always the order in which the controls were added to the form. The first control added to the form has a TabOrder value of 0, the second is 1, the third is 2, and so on. Change this by changing the TabOrder property. Each control has a unique tab-order value within its parent. Assigning TabOrder a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of TabOrder, but instead is given the number that ensures that the control is the last in the tab order.
- Type:
int
- TabStop¶
Embarcadero Technologies does not currently have any additional information.
- Type:
bool
- Touch¶
Specifies the touch manager component associated with the control. Use the Touch property to access gesturing options associated with a control. Touch specifies a class of type TTouchManager. Touch is used to:
Associate a TGestureManager. (TGestureManager manages all the standard gestures that can be used by the control.) Select the standard, interactive, or custom gestures to associate with the control. (You can also connect each gesture to an action; see Assigning Actions to Gestures.)
- Type:
TouchManager
- TouchTargetExpansion¶
Set of optional pixel values you can specify to expand the touch target of a FireMonkey styled control. FMX.Controls.TControl.TouchTargetExpansion is a published property of all FireMonkey styled controls that support Touch. Defined as an FMX.Types.TBounds, TouchTargetExpansion takes four optional parameters representing the expansion of the four sides of the control in pixels (Bottom, Left, Right, Top). Each parameter specifies the size of an additional screen area that is to be treated as part of the touch target of the control. The following figure illustrates how TouchTargetExpansion expands the touch target for a FireMonkey control:
- Type:
- UpdateEffects()¶
Updates the effects of the current control and of the control’s parent. UpdateEffects is called every time the current control is changed (repainted, realigned, resized). UpdateEffects is also used when a new child is added to the control by calling AddObject.
- UpdateRect¶
Specifies the rectangle area of the control that needs to be updated. UpdateRect is a union between the rectangle areas that need to be painted over the control when:
The control receives focus. The control gets new effects. The control’s children are updated. The control’s parent is updated.
- Type:
- Visible¶
Returns/Sets the Control Visibility
- Width¶
Specifies the horizontal size of the control (in pixels). Use the Width property to read or change the width of the control.
- Type:
float