Table of Contents

TTMSFNCControl Class

Ready-to-use TMS FNC control that publishes the full TTMSFNCCustomControl API. Use this class as the base for custom controls that need a concrete, registered implementation.

API unit family: TMSFNCCustomControl Inherits from: TTMSFNCCustomControl

Syntax

TTMSFNCControl = class(TTMSFNCCustomControl)

Properties

Name Description
AdaptToStyle When True the control adapts its appearance colours to match the active IDE or application style. Default is False. (inherited from TTMSFNCCustomControl)
AllowFocus When True (default) the control can receive keyboard focus. Set to False to prevent focus. (inherited from TTMSFNCCustomControlBaseCommon)
BlockPersistenceInterface When True, the IPersistence interface is blocked globally for all controls in the hierarchy, preventing automatic JSON serialisation of persistence-aware properties. (inherited from TTMSFNCCustomControl)
BlockRepaint When True calls to Invalidate are suppressed. Use around bulk property changes to avoid redundant repaints. (inherited from TTMSFNCCustomControl)
Color Background colour of the control when Fill.Kind is not set. Defaults to gcWhite. (inherited from TTMSFNCCustomControl)
ControlAlignment Framework-neutral alignment that positions the control relative to its parent. Defaults to caNone (manual placement). (inherited from TTMSFNCCustomControlBaseCommon)
DataBoolean General-purpose Boolean data slot. True and False have caller-defined meaning. (inherited from TTMSFNCCustomControl)
DataInteger General-purpose integer data slot for associating an arbitrary native integer value with the control. (inherited from TTMSFNCCustomControl)
DataObject General-purpose object data slot for associating an arbitrary object reference with the control. (inherited from TTMSFNCCustomControl)
DataPointer General-purpose untyped data slot for associating arbitrary pointer values with the control. (inherited from TTMSFNCCustomControl)
DataString General-purpose string data slot for associating an arbitrary string value with the control. (inherited from TTMSFNCCustomControl)
DesigntimeFormPixelsPerInch Pixels-per-inch value of the form as recorded at design time. Used internally to compute DPI scaling at runtime. (inherited from TTMSFNCCustomControlBaseCommon)
HitTest When True (default) the control participates in mouse hit-testing and receives mouse events. (inherited from TTMSFNCCustomControlBase)
Left Horizontal position of the control's left edge in pixels, relative to its parent. FMX only — use standard Left on other frameworks. (inherited from TTMSFNCCustomControlBase)
LocalRect The usable client area of the control as a floating-point rectangle with origin (0, 0). (inherited from TTMSFNCCustomControlBase)
PaintScaleFactor DPI scale factor applied during painting. Use ScalePaintValue to convert pixel sizes in custom drawing code. (inherited from TTMSFNCCustomControlBaseCommon)
ResourceScaleFactor DPI scale factor applied when loading image resources (bitmaps). Use ScaleResourceValue to convert pixel sizes for resource loading. (inherited from TTMSFNCCustomControlBaseCommon)
ShowAcceleratorChar When True (default) a character preceded by an ampersand in caption text is underlined as an accelerator key. (inherited from TTMSFNCCustomControl)
Stored When True (default) the control's state is included when saving form/frame data. Set to False to exclude it. (inherited from TTMSFNCCustomControlBase)
Top Vertical position of the control's top edge in pixels, relative to its parent. FMX only — use standard Top on other frameworks. (inherited from TTMSFNCCustomControlBase)
UndoManager Provides access to the built-in undo/redo stack. Use to push, pop, or replay undoable operations. (inherited from TTMSFNCCustomControl)

Methods

Name Description
BeginUpdate Suspends visual updates for the web control implementation so multiple property changes can be applied without intermediate repaints. (inherited from TTMSFNCCustomControlBase)
CanFocus Returns True when the control is able to receive keyboard focus. (inherited from TTMSFNCCustomControlBase)
DisableBackground Temporarily disables drawing the control background so that custom code can paint the background manually. (inherited from TTMSFNCCustomControl)
DisableFill Temporarily disables applying Fill during painting, allowing the background to show through. (inherited from TTMSFNCCustomControl)
DisableStroke Temporarily disables drawing the Stroke border around the control. (inherited from TTMSFNCCustomControl)
DragDrop Called by the framework when a drag-and-drop operation completes over the control. Dispatches to HandleDragDrop for cross-framework processing. (inherited from TTMSFNCCustomControlBase)
EnableBackground Re-enables automatic background drawing after a DisableBackground call. (inherited from TTMSFNCCustomControl)
EnableFill Re-enables applying Fill during painting after a DisableFill call. (inherited from TTMSFNCCustomControl)
EnableStroke Re-enables drawing the Stroke border after a DisableStroke call. (inherited from TTMSFNCCustomControl)
EndUpdate Re-enables visual updates for the web control implementation after a BeginUpdate call and triggers a repaint. (inherited from TTMSFNCCustomControlBase)
GetButtonBitmap Returns the native OS button bitmap of the given size for use in custom drawing. Pass ADown, AFocused, and AEnabled to select the appropriate visual state. (inherited from TTMSFNCCustomControl)
GetCheckBoxBitmap Returns the native OS checkbox bitmap for use in custom drawing. Pass AChecked, AFocused, and AEnabled to select the appropriate visual state. (inherited from TTMSFNCCustomControl)
GetControlMargins Returns the four margin values of the control. (inherited from TTMSFNCCustomControlBaseCommon)
GetRadioButtonBitmap Returns the native OS radio-button bitmap for use in custom drawing. Pass AChecked, AFocused, and AEnabled to select the appropriate visual state. (inherited from TTMSFNCCustomControl)
Invalidate Schedules a full repaint of the control on the next paint cycle. (inherited from TTMSFNCCustomControlBase)
IsDesignTime Returns True when the control is running inside the IDE at design time. (inherited from TTMSFNCCustomControl)
IsDesignerForm Returns True when the control is placed on a design-time form class derived from TTMSFNCCustomDesignerForm. (inherited from TTMSFNCCustomControl)
IsDesigning Returns True when the control is hosted on the IDE form designer. (inherited from TTMSFNCCustomControl)
IsDestroying Returns True while the control is in the process of being destroyed. (inherited from TTMSFNCCustomControl)
IsLoading Returns True while the owning form or data module is streaming its DFM content (i.e. during component loading). (inherited from TTMSFNCCustomControl)
IsReading Returns True while the control's persistent properties are being read from a stream. (inherited from TTMSFNCCustomControl)
LoadSettingsFromFile Deserialises settings from a previously saved JSON file and applies them to the control. (inherited from TTMSFNCCustomControl)
LoadSettingsFromStream Deserialises settings from a JSON stream and applies them to the control. (inherited from TTMSFNCCustomControl)
NotifyDataBinderEdit Notifies any attached data binder that the user has started editing a value. (inherited from TTMSFNCCustomControl)
NotifyDataBinderPost Notifies any attached data binder to post the current edit to the underlying dataset. (inherited from TTMSFNCCustomControl)
NotifyDataBinderSetActiveRecord Notifies any attached data binder to move to the active record in the underlying dataset. (inherited from TTMSFNCCustomControl)
NotifyDataBinderUpdate Notifies any attached data binder to refresh its display from the underlying dataset. (inherited from TTMSFNCCustomControl)
NotifyDataBinderValueChanged Notifies any attached data binder that the bound value has changed. (inherited from TTMSFNCCustomControl)
Paint Renders the control onto its canvas. Called by the framework on every repaint cycle. (inherited from TTMSFNCCustomControl)
Resize Called by the framework when the control is resized. Override to update internal layout after a size change. (inherited from TTMSFNCCustomControl)
SaveSettingsToFile Serialises all (or only appearance) settings to a file in JSON format. (inherited from TTMSFNCCustomControl)
SaveSettingsToStream Serialises all (or only appearance) settings to a stream in JSON format. (inherited from TTMSFNCCustomControl)
ScalePaintValue Scales an integer value by the current paint DPI factor, returning the scaled integer. (inherited from TTMSFNCCustomControlBaseCommon)
ScaleResourceValue Scales an integer value by the current resource DPI factor, returning the scaled integer. (inherited from TTMSFNCCustomControlBaseCommon)
SetControlMargins Sets the four margin values of the control in one call. (inherited from TTMSFNCCustomControlBaseCommon)

Events

Name Description
OnAfterDraw Fired after the control has finished painting, allowing additional content to be drawn on top. (inherited from TTMSFNCCustomControl)
OnBeforeDraw Fired just before the control paints its background. Set ADefaultDraw to False to take over painting completely. (inherited from TTMSFNCCustomControl)
OnCanLoadProperty Fired for each property during settings deserialisation. Set ACanLoad to False to prevent a property value from being applied. (inherited from TTMSFNCCustomControl)
OnCanSaveProperty Fired for each property during settings serialisation. Set ACanSave to False to exclude a specific property from the saved output. (inherited from TTMSFNCCustomControl)