TTMSFNCStylesManager Class
Non-visual component that loads JSON-based style definitions and applies them to registered components and forms.
API unit family: TMSFNCStyles
Inherits from: TTMSFNCCustomComponent
Syntax
TTMSFNCStylesManager = class(TTMSFNCCustomComponent)
Properties
| Name |
Description |
| Options |
Options that control how the styles manager adapts form colors when applying a style. |
| Style |
The last applied JSON style string; setting this property applies the style immediately to all registered components. |
| StyleForm |
The form whose background color is adapted when a style is loaded with TTMSFNCStylesManagerOptions.AdaptFormColor enabled. |
| StyleResource |
The name of an application resource containing a JSON style; setting this property loads and applies the style immediately. |
Methods
| Name |
Description |
| CombineStyles |
Merges multiple JSON style files into a single style string and returns it. |
| GetStyleFromFile |
Returns the JSON style string read from the specified file. |
| GetStyleFromResource |
Returns the JSON style string stored in the named application resource. |
| LoadStyleFromFile |
Loads a JSON style definition from the specified file and applies it to all registered components. |
| LoadStyleFromResource |
Loads a JSON style definition from the named application resource and applies it to the given component list. |
| LoadStyleFromStream |
Loads a JSON style definition from the specified stream and applies it to all registered components. |
| LoadStyleFromText |
Loads a JSON style definition from the specified string and applies it to all registered components. |
| LoadStyleFromURL |
Downloads a JSON style definition from the specified URL and applies it to the given component list. |
Events
| Name |
Description |
| OnCanLoadStyle |
Fires before a style is applied to a component, allowing the application to suppress styling for specific components. |
| OnStyleLoaded |
Fires after a style has been successfully applied to a component. |
Used by