Search Results for

    Show / Hide Table of Contents

    TXlsFile.SetObjectProperties Method

    Sets all the properties of the shape. This allows for more complete control than TExcelFile.SetObjectProperty(Integer, string, TShapeOption, string) beause it can specify for example a xlsx fill using a theme color, instead of simple RGB fills.

    Syntax

    Unit: FlexCel.XlsAdapter

    procedure TXlsFile.SetObjectProperties(const objectIndex: Integer; const objectPath: string; shapeProperties: IShapeProperties; const applyAnchor: Boolean); override;

    Parameters

    <-> Parameter Type Description
    const objectIndex Integer Index of the object (1-based)
    const objectPath string Index to the child object you want to change the property.
    If it is a simple object, you can use String.Empty here, if not you need to get the ObjectPath from TExcelFile.GetObjectProperties(Integer, Boolean)
    If it is "absolute"(it starts with "\"), then the path includes the objectIndex, and the objectIndex is not used. An object path of "\1\2\3" is exactly the same as using objectIndex = 1 and objectPath = "2\3"
    shapeProperties IShapeProperties All the properties of the object. You will normally get this value from TExcelFile.GetObjectProperties(Integer, Boolean) and then replace the values you want.
    const applyAnchor Boolean If true, the anchor of the shape properties will be copied too. If false, the anchor won't change.
    False can be used when you want to copy the properties from one object to another, but keep the positions.

    See also

    • TXlsFile
    In This Article
    Back to top FlexCel Studio for VCL and FireMonkey v7.24
    © 2002 - 2025 tmssoftware.com