Search Results for

    Show / Hide Table of Contents

    TFlxFormat Record

    Format for one cell or named style. Cell formats are used to format cells, Named styles to create styles. A Cell format can have a parent style format, even when normally this is null (parent is normal format). Named styles will have a non-null Style property. Cell formats will have style = null.

    Syntax

    Unit: FlexCel.Core

    TFlxFormat = record;

    Fields

    Name Description
    FillPattern Fill pattern.
    IsStyle When true this format is a named style, when false a cell format.
    Font Cell Font.
    Borders Cell borders.
    Format Format string. (For example, "yyyy-mm-dd" for a date format, or "#.00" for a numeric 2 decimal format)
    This format string is the same you use in Excel under "Custom" format when formatting a cell, and it is documented in Excel documentation. Under "Finding out what format string to use in TFlxFormat.Format" section in UsingFlexCelAPI.pdf you can find more detailed information on how to create this string.
    HAlignment Horizontal alignment on the cell.
    VAlignment Vertical alignment on the cell.
    Locked Cell is locked.
    Hidden Cell is Hidden.
    WrapText Cell wrap.
    ShrinkToFit Shrink to fit.
    Rotation Text Rotation in degrees.

    When this value is from 0 to 90 then this is the rotation degrees in the up direction.

    When this value is from 91 to 180 then this is a rotation in the down direction. 91 means -1 degree rotation, 92 means -2 degrees, and so on until 180 which means -90 degrees.

    255 is vertical text.

    Other values are invalid.
    Indent Indent value. (in characters). This value can't be bigger than 15 in Excel 2003 or earlier, and no bigger than 250 in Excel 2007 or newer.
    Lotus123Prefix If true the prefix for the cell is compatible with Lotus 123.
    ParentStyle Name of the Parent style. Normally you will want to keep it at null (parent is normal style), but you can write an existing style here.
    If IsStyle is true this property is not used.
    LinkedStyle If this object holds a Cell format, LinkedStyle specifies which properties of the cell format are linked to its parent style.
    If this object holds a Style format, LinkedStyle specifies the default set of properties that will be applied when you use this style from Excel.
    ReadingOrder Reading order for the cell.

    Methods

    Name Description
    Create Creates an empty Format class. Don't use this to get TFlxFormat instances, use XlsFile.​Get​Default​Format instead.
    Null Creates an invalid Format class.
    CreateStandard2007 Returns a standard TFlxFormat for Excel 2007. (Font name is Calibri, etc). You will normally want to use TExcelFile.​Get​Default​Format instead of this, since it returns the default format for an specific file, and not a generic format like this.
    Clone Returns a deep copy of the format.
    Equals Returns true if 2 instances have the same values.
    GetHashCode Returns the hashcode of the object.
    IsNull Returns true if the record doesn't have a defined value.
    HasValue Returns true if the record has a defined value. This is the inverse of IsNull

    Operators

    Name Description
    Equality Adapts the = operator so it returns true when both instances have the same values.
    Inequality Adapts the <> operator so it returns true when both instances have different values.

    Properties

    Name Description
    NotNullParentStyle This is similar to ParentStyle but will return "Normal" when the parent is null.
    WillWrap Returns true if the text will wrap in the cell. This might be because WrapText is true, of because the alignment is justify or distributed.
    In This Article
    Back to top FlexCel Studio for VCL and FireMonkey v7.24
    © 2002 - 2025 tmssoftware.com