StyledControl

Qualified name: delphifmx.StyledControl

class StyledControl

Bases: Control

TStyledControl is the base class for customizable and user-interaction controls. TStyledControl extends TControl to act as the immediate superclass for concrete user-facing widgets. For descendants of TStyledControl, you can set the style resource and the basis for FireMonkey’s dynamic look-and-feel. Subclasses of TStyledControl search their style resource among those assigned to the StyleBook property of the form, using a simple search routine based on class names returned by the GetStyleObject method. The access to the subcomponents defined by the same style permits the parent control to be modified at run time. To apply a style to a control, set the StyleLookup property to the name of the style. For more details about the style and design of FireMonkey components, see FireMonkey Component Rendering and Customizing with Styles. Descendants of TStyledControl are controls like TPanel, TLabel, TCheckBox, TImageControl, or TCalendar.

Methods

ApplyStyleLookup

Gets and applies the style of a TStyledControl.

BeforeDestruction

Performs any necessary actions before the first destructor is called.

FindStyleResource

Finds the linked resource object for the style specified by name.

Inflate

Call this procedure to get and apply its style lookup.

LookupStyleObject

Looks for the style resource object linked to the TStyledControl.

NeedStyleLookup

Call this procedure to indicate that this control requires to get and apply its style lookup.

PrepareForPaint

Embarcadero Technologies does not currently have any additional information.

RecalcSize

Embarcadero Technologies does not currently have any additional information.

SetNewScene

Sets a new Scene for the current control.

StartTriggerAnimation

Embarcadero Technologies does not currently have any additional information.

StartTriggerAnimationWait

Embarcadero Technologies does not currently have any additional information.

Attributes

AbsoluteClipRect

Specifies the absolute rectangle of the control after all its parent controls clip it.

AbsoluteEnabled

Specifies whether the control is absolutely enabled.

AbsoluteHeight

Specifies the absolute height of the control.

AbsoluteMatrix

Specifies the absolute transformation matrix of the control.

AbsoluteOpacity

Specifies the absolute opacity of the control.

AbsoluteRect

Specifies the absolute rectangle that bounds the control.

AbsoluteScale

Specifies the absolute scale of the control.

AbsoluteWidth

Specifies the absolute width of the control.

ActionClient

Specifies whether the component object has an associated action.

AdjustSizeValue

Updates the width and height of this control according to its current style

AdjustType

Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control

Align

Specifies the alignment options (top, left, client, and so on) of this control.

Anchors

Specifies how the control is anchored to its parent.

ApplyingEffect

A flag that signals when a control is in the process of applying an effect.

AutoCapture

Specifies whether the control captures mouse events.

AutoTranslate

Specifies whether the control's text should be translated

AxisAlignedRect

A TRectF defined by the width and height of the control.

BoundsRect

Specifies the bounding rectangle of the control.

CanParentFocus

Specifies whether the parent of this control should be evaluated to receive focus.

Canvas

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.

ChildrenRect

Specifies the bigger rectangle area occupied by parent and children controls.

ClassName

Returns the TObject.ClassName

ClipChildren

Specifies if children of the control should be clipped to the control's on-screen region.

ClipParent

Specifies whether the current control has clipped its parent.

ClipRect

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

Controls

Returns an iterator over contained controls

ControlsCount

Returns the count of contained controls

Cursor

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.

DefaultSize

Embarcadero Technologies does not currently have any additional information.

DefaultStyleLookupName

Returns a string with the name of the default style of this control

DesignInfo

Contains information used by the Form designer.

DisableDisappear

Embarcadero Technologies does not currently have any additional information.

DisableFocusEffect

Specifies whether the control has the focus effect disabled.

DragMode

Specifies how the control initiates drag-and-drop operations.

EnableDragHighlight

Specifies whether the control is highlighted when the dragged object is over it.

Enabled

Specifies whether the control responds to mouse, keyboard, and timer events.

FixedSize

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.

HasClipParent

Control that is a direct child of this control and has clipped this control.

HasDisablePaintEffect

Specifies whether the control's effect is painted.

HasEffect

Specifies whether the control has an applied effect.

Height

Height specifies the vertical size of the control (in dp).

HelpContext

Contains the numeric context ID that identifies the Help topic for the control.

HelpKeyword

Contains the keyword string that identifies the Help topic for the control.

HelpType

Specifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.

Hint

Specifies the text string that appears when the user moves the mouse over a control.

HitTest

Enables the control to capture mouse events.

InPaintTo

Specifies whether the control is currently being painted.

Index

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

InheritedCursor

Image used to represent the mouse pointer when it passes into the region covered by the control.

InvertAbsoluteMatrix

Specifies the inverse matrix of AbsoluteMatrix.

IsDragOver

Specifies whether a dragged object is over the area of the current control.

IsFocused

Determines whether the control has input focus.

IsInflated

Whether the current style of this control has been actually applied to the control.

IsMouseOver

Specifies whether the mouse cursor is over the control.

IsVisible

Specifies whether the control is visible.

LocalRect

Specifies the local rectangle for painting the control.

Locked

Specifies whether the control is locked at design time.

Margins

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.

OnGesture

Callable[[Object, GestureEventInfo, bool], None]:

Opacity

Specifies the control opacity.

Owner

Returns the Component Owner

Padding

Aligns the component to the padding points of other components.

Parent

Returns/Sets the Control Visibility

ParentClassStyleLookupName

The name of the default style of the parent class of this control.

ParentControl

Specifies the parent control of this control.

ParentedRect

Specifies the bounding rectangle of the control within its parent.

ParentedVisible

Specifies whether all the control's parents are visible.

PopupMenu

Specifies the context (pop-up) menu object.

Position

Returns an access to the position of the control inside its parent

Pressed

Indicates whether the control is currently pressed.

PressedPosition

A point that indicates where exactly on the control the click occured.

Root

Specifies the root parent of this object.

Scene

Specifies the current scene in which the control is drawn.

ShowHint

Specifies whether the Hint can be shown.

Size

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.

StyleLookup

Specifies the name of the resource object to which the current TStyledControl is linked

StyleName

Specifies the style name for this FMX component.

StyleState

This property allows you to define the current state of style

StylesData

Value:

TabOrder

Indicates the position of the control in its parent's tab order.

TabStop

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.

Touch

Specifies the touch manager component associated with the control.

TouchTargetExpansion

Set of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.

UpdateRect

Specifies the rectangle area of the control that needs to be updated.

VCLComObject

Represents information used internally by components that support COM.

Visible

Returns/Sets the Control Visibility

Width

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

AdjustSizeValue

Updates the width and height of this control according to its current style

AdjustType

Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control

ApplyStyleLookup()

Gets and applies the style of a TStyledControl.

AutoTranslate

Specifies whether the control’s text should be translated

BeforeDestruction()

Performs any necessary actions before the first destructor is called. FMX.Controls.TStyledControl.BeforeDestruction inherits from System.Classes.TComponent.BeforeDestruction. All content below this line refers to System.Classes.TComponent.BeforeDestruction. Performs any necessary actions before the first destructor is called. BeforeDestruction is called automatically immediately before the component’s first destructor executes. Do not call it explicitly in your applications. As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.

DefaultStyleLookupName

Returns a string with the name of the default style of this control

FindStyleResource(AStyleLookup: str, Clone: bool) FmxObject

Finds the linked resource object for the style specified by name. The AStyleLookup parameter specifies the name of the style. If AStyleLookup is empty, FindStyleResource returns nil. If no resource object is linked directly to the control, FindStyleResource looks to the styles of the control’s children. If no resource object is found, it returns nil. Clone determines whether the returned style resource object should be the original style object (False) or a copy of the original (True). Finds the linked resource object for the style specified by name. The AStyleLookup parameter specifies the name of the style. If AStyleLookup is empty, FindStyleResource returns nil. If no resource object is linked directly to the control, FindStyleResource looks to the styles of the control’s children. If no resource object is found, it returns nil. Clone determines whether the returned style resource object should be the original style object (False) or a copy of the original (True).

HelpContext

Contains the numeric context ID that identifies the Help topic for the control. In case of a .chm Help file, you must symbolically map Context IDs of Help topics to numeric topic ID values in the [MAP] section of your project (.hhp) file. To enable Context ID-based context-sensitive Help for a control, set HelpType to htContext and set HelpContext to a numeric topic ID. A topic ID of 0 (default) means that no Help topic is provided for the control.

Type:

int

HelpKeyword

Contains the keyword string that identifies the Help topic for the control. To enable the keyword-based context-sensitive Help for a control, set the HelpType property to htKeyword and set HelpKeyword to a keyword string. No keyword (zero-length string, the default) means that no Help topic is provided for the control.

Type:

str

HelpType

Specifies whether the control’s context-sensitive Help topic is identified by a context ID or by keyword. If HelpType is htContext, the HelpContext property value identifies the control’s Help topic. If HelpType is htKeyword, the HelpKeyword property value identifies the control’s Help topic.

Type:

HelpType

Inflate()

Call this procedure to get and apply its style lookup.

LookupStyleObject(Instance: FmxObject, Context: FmxObject, Scene: IScene, StyleLookup: str, DefaultStyleLookup: str, ParentClassStyleLookup: str, Clone: bool, UseGlobalPool: bool) FmxObject

Looks for the style resource object linked to the TStyledControl. If no style is defined for the current control, LookupStyleObject seeks in the current scene for the active style. If the current scene does not have a resource object, LookupStyleObject continues the search through the default styles and Parent’s style.

NeedStyleLookup()

Call this procedure to indicate that this control requires to get and apply its style lookup.

ParentClassStyleLookupName

The name of the default style of the parent class of this control. The name of the style is composed of the class name without the leading T, followed by the string “style”. For example, if the class name is TEdit, the style name is Editstyle.

Type:

str

PrepareForPaint()

Embarcadero Technologies does not currently have any additional information.

RecalcSize()

Embarcadero Technologies does not currently have any additional information.

SetNewScene(AScene: IScene) None

Sets a new Scene for the current control. FMX.Controls.TStyledControl.SetNewScene inherits from FMX.Controls.TControl.SetNewScene. All content below this line refers to FMX.Controls.TControl.SetNewScene. 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.

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.

StyleLookup

Specifies the name of the resource object to which the current TStyledControl is linked

StyleState

This property allows you to define the current state of style

StylesData

Value: