IShapeProperties Interface
A class describing an Excel graphics object.
Syntax
Unit: FlexCel.Core
IShapeProperties = interface(IInterface);
Methods
Name | Description |
---|---|
TextAsRichString | Converts the TDrawingRichString to a TRichString |
Children | Returns one of the shapes inside of this one. |
AddChild | Adds a new child for this autoshape. |
Clone | Returns a deep copy of the object. |
GetAlternateText | Returns the Alternate Text for a shape. This is used for example in the "Alt" attribute when exporting to html. Note that if there is no alternate text for the image (TShapeOption.wzDescription), this method will return the image name. The idea is to return something that can describe the image for users who can't see them. |
HasShadow | Returns true if the shape has a shadow. |
Properties
Name | Description |
---|---|
ShapeType | Type of shape. Note that this is not the same as ObjectType A comment might have a ShapeType=TShapeType.Rectangle, but its object type is TObjectType.Comment. A rectangle Autoshape will also have ShapeType=TShapeType.Rectangle, but its ObjectType will be TObjectType.Rectangle. |
ObjectType | Type of object. Note that this is not the same as ShapeType. A comment might have a ShapeType = TShapeType.Rectangle, but its object type is TObjectType.Comment. A rectangle Autoshape will also have ShapeType=TShapeType.Rectangle, but its ObjectType will be TObjectType.Rectangle. |
ShapeName | Name of the shape if it is named, null otherwise. |
ShapeId | This is an internal identified for the shape. It will remain the same once the file is loaded, but it might change when you load the same file at different times. |
ObjectPath | Use this string to identify the shape when it is not the first on the hierarchy. For Example, imagine you have a Group Shape A with 2 children, B and C. If you want to change the text on shape C, you need to call SetObjectText(n,ObjectPath); The object path can be of 2 types: Absolute or relative. Absolute object paths start with "\\" and include the parent object. Relative paths don't include the main group shape. For example the absolute path "\\1\\2\\3" is the same as accessing the object 1, with object path "2\\3"...[more] |
ObjectPathAbsolute | Use this string to identify the shape when it is not the first on the hierarchy. For Example, imagine you have a Group Shape A with 2 children, B and C. If you want to change the text on shape C, you need to call SetObjectText(n, ObjectPath); The object path can be of 2 types: Absolute or relative. Absolute object paths start with "\\" and include the parent object. Relative paths don't include the main group shape. For example the absolute path "\\1\\2\\3" is the same as accessing the object 1, with object path "2\\3"...[more] |
ObjectPathShapeId | Returns the object path as a shape id. This is used mostly internally. |
Text | Text of the shape if is has some, null otherwise. |
TextFlags | Option flags for the Text shape. Important:Instead of changing this flag, you should use instead LockText, TextHorizontalAlignment and TextVerticalAlignment. Changing those properties will automatically change the text flags, but in a simpler way. The option flags work differently in xls and xlsx files. All properties in FlexCel assume the xls way, and convert to the corresponding properties in xlsx when saving or loading xlsx files. For more information, check...[more] |
TextHorizontalAlignment | This property gets or sets the horizontal alignment for the text. Note that xls and xlsx files behave differently when text is rotated with TextRotated. In xlsx, if you rotate the text 90 degrees clockwise, a text aligned to the top and left will be aligned to the top and right of the shape. While in xls, the rotation is absolute and always means aligned to the top left of the shape. This method uses the xls way, even when dealing with xlsx files. For more information see...[more] |
TextVerticalAlignment | This property gets or sets the vertical alignment for the text. Note that xls and xlsx files behave differently when text is rotated with TextRotated. In xlsx, if you rotate the text 90 degrees clockwise, a text aligned to the top and left will be aligned to the top and right of the shape. While in xls, the rotation is absolute and always means aligned to the top left of the shape. This method uses the xls way, even when dealing with xlsx files. For more information see...[more] |
LockText | True if the Lock Text option is on (Format Text Box dialog box, Protection tab). When changing this property, the value of TextFlags, will change too. |
TextRotation | Text rotation: 0 means horizontal, 1 means vertical text, 2 means rotated -90 degrees clockwise, 3 means rotated 90 degrees clockwise. This method uses the xls way to set text rotation. For more information, see Text Rotation In Xls And Xlsx |
TextRotated | This methods gets or sets TextRotation in a simpler way. As with all FlexCel methods, it uses the xls, not the xlsx way to apply the rotation. For more information, see Text Rotation In Xls And Xlsx. |
RotateTextWithShape | If true, the text will be rotated with the shape. Note that this option is only available in Excel 2007 or newer. Older Excels will never rotate the text with the shape. |
TextVerticalOverflow | Gets or sets how the text overflows the shape vertically. Note that the checkbox in Excel "Allow text to overflow shape" sets both this property and TextHorizontalOverflow |
TextHorizontalOverflow | Gets or sets how the text overflows the shape horizontally. Note that the checkbox in Excel "Allow text to overflow shape" sets both this property and TextVerticalOverflow |
ShapeOptions | A lot of personalized settings, like shadow type fill color, line type, etc. |
Anchor | Coordinates of the shape. Note that when the shape is a group, this value is null and the real anchor is returned in the first child of the shape. To get the real Anchor of a first level object, use NestedAnchor |
XlsxChartAnchor | If the chart is inside a chart, this member can hold more exact information than Anchor. |
ShapeGeom | Geometry of the shape, if it is an xlsx shape. Shapes in xls will have this value null. This property contains a parsed ShapeGeometry and it is used instead if it exists. |
ShapeGeometry | Geometry of the shape as XML, if it is an xlsx shape. Shapes in xls will have this value empty. You can find the XML string by creating the shape in Excel and opening the file with APIMate. |
ShapeFill | Fill of the shape, for xlsx shapes (even those which are saved in xls files). This property has a more complete description of the fill style than the one you can get by querying ShapeOptions, but will be null for xls files saved by Excel 2003 or earlier. |
ShapeLine | Line of the shape, for xlsx shapes (even those which are saved in xls files). This property has a more complete description of the line style than the one you can get by querying ShapeOptions, but will be null for xls files saved by Excel 2003 or earlier. |
ShapeEffects | Effects for the shape, for xlsx shapes (even those which are saved in xls files). The effects include glow, shadow, etc. |
ShapeThemeEffects | Returns the theme effects applied to the shape. |
ShapeThemeFont | Theme Font used for the text in the shape. This property only affects xlsx files, in xls files the font is always arial black. You can change the font only inside the rich string, not in a global way. In xls files this will be null. |
NestedOptions | When the shape is a group, the real properties of the shape are in its first children. This method returns the correct shape options. |
NestedAnchor | Real Coordinates of the shape. Note that when the shape is a group, the value in Anchor is null and the real anchor is returned in the first child of the shape. This method will get the real Anchor of a first level object. |
FlipH | True if the shape is flipped horizontally. |
FlipV | True if the shape is flipped vertically. |
IsConnector | True if the shape is a connector. |
StartShapeConnection | This property only applies to connector shapes. It identifies the first shape where the connector is attached to. |
EndShapeConnection | This property only applies to connector shapes. It identifies the second shape where the connector is attached to. |
True if the shape should be printed. |
|
IsLocked | True if the shape should is locked. |
Visible | True if the shape is visible. |
IsActiveX | Returns true if the object is an ActiveX object. |
IsOleObject | Returns true if the object is an embedded ole object. |
IsInternal | Returns true if the object is an internal object, like a comment or the arrow of an autofilter. Internal objects shouldn't be modified. |
ChildrenCount | Number of shapes that are inside this shape. |