Overview
TheTFormat unit provides framework-agnostic formatting classes for defining visual styles in TeeGrid. These classes work identically across VCL, FireMonkey, and Lazarus frameworks.
Unit: Tee.Format.pas
Class Hierarchy
TPersistentChange
Base class for all format classes with change notification.Constructor
AChanged: Event handler called when properties change
Properties
OnChange
TColor Type
TColorHelper
Helper record for color manipulation.From
AColor: Base colorAOpacity: Opacity (0.0 - 1.0)
Opacity
Split
TBrush
Defines fill properties for shapes and backgrounds.Properties
Color
Gradient
Picture
Visible
Methods
InitColor
Usage Example
TStroke
Defines outline/border properties.Properties
Color
Size
Style
Solid: Continuous lineDash: Dashed lineDot: Dotted lineDashDot: Dash-dot patternDashDotDot: Dash-dot-dot patternCustom: Custom pattern
EndStyle
Flat: Square end at endpoint (default)Round: Rounded endSquare: Square end extending beyond endpoint
JoinStyle
Mitter: Sharp corner (default)Round: Rounded cornerBevel: Beveled corner
Visible
Constructors
Create
CreateColor
Usage Example
THiddenStroke
TStroke with default Visible = False.TFont
Defines text font properties.Properties
Name
Size
Style
fsBold: Bold textfsItalic: Italic textfsUnderline: Underlined textfsStrikeOut: Strikethrough text
Color
Brush
Class Variables
Usage Example
TGradient
Defines gradient fill properties.Properties
Direction
Vertical: Top to bottomHorizontal: Left to rightDiagonal: Top-left to bottom-rightBackDiagonal: Top-right to bottom-leftRadial: Center outward
Colors
Angle
Inverted
Visible
Methods
InitColors
Usage Example
TPicture
Defines image/bitmap properties.Properties
Stretch
Methods
LoadFromFile
SetGraphic
Clear
Usage Example
TFormat
Combines brush and stroke for complete shape formatting.Properties
Brush
Stroke
Methods
ShouldPaint
True if either brush or stroke is visible.
Usage Example
TTextFormat
Extends TFormat with font properties.Properties
Font
Inherited
Brush: Background fillStroke: Border outline
Usage Example
TVisibleFormat
TFormat with a Visible property.Properties
Visible
Methods
Show / Hide
TCoordinate
Defines a coordinate value in pixels or percentage.Properties
Value
Units
TSizeUnits.Pixels: Absolute pixelsTSizeUnits.Percent: Percentage of container
Automatic
Pixels (Read-Only)
Prepare.
Methods
Prepare
ATotal: Total size for percentage calculation
Calculate
Usage Example
Common Patterns
Creating Themed Formats
Reusing Formats
See Also
- TPainter - Uses format classes for rendering
- TRender - Applies formats to grid elements
- Styling Guide - Visual customization examples
