FireMonkey Style – TStyleTag

There appears to be an oversight by Embarcadero with the TStyleTag component not being registered for use.

TStyleTag is a handy little component that allows you to add it to a style definition and have it store an Integer, Float or String value. This is used in some of the default styles, one place being the TTrackBar where it is used to hold the default thumb size of the track item.

This allows you to retrieve the thumb size depending on the default style (Windows or Mac) and adjust your user interface depending on the value.

TStyleTag Component

I’ve created a package that your can compile and install into the IDE to register this component.

Download Package

The component doesn’t have to only be used in a style definition, you can drop it directly on your form if you have a use for its functionality.

NOTE: While the component is used in the default Windows and Mac styles, it doesn’t seem to be used in the other FireMonkey styles. Although I did only look in a couple of them. Perhaps something that will be address in an update.

 

 

Comments are closed.