Class CellularTextObject
Represents a text object which draws each symbol of text in its own cell.
Inheritance
Implements
Inherited Members
Namespace: FastReport
Assembly: FastReport.Base.dll
Syntax
public class CellularTextObject : TextObject, IFRSerializable
Remarks
The text may be aligned to left or right side, or centered. Use the HorzAlign property to do this. The "justify" align is not supported now, as well as vertical alignment.
The cell size is defined in the CellWidth and CellHeight properties. These properties are 0 by default, in this case the size of cell is calculated automatically based on the object's Font.
To define a spacing (gap) between cells, use the HorzSpacing and VertSpacing properties.
Constructors
CellularTextObject()
Initializes a new instance of the CellularTextObject class with the default settings.
Declaration
public CellularTextObject()
Properties
CellHeight
Gets or sets the height of cell, in pixels.
Declaration
public float CellHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
If zero width and/or height specified, the object will calculate the cell size automatically based on its font.
CellWidth
Gets or sets the width of cell, in pixels.
Declaration
public float CellWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
If zero width and/or height specified, the object will calculate the cell size automatically based on its font.
HorzSpacing
Gets or sets the horizontal spacing between cells, in pixels.
Declaration
public float HorzSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
VertSpacing
Gets or sets the vertical spacing between cells, in pixels.
Declaration
public float VertSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
Assign(Base)
Copies the contents of another, similar object.
Declaration
public override void Assign(Base source)
Parameters
Type | Name | Description |
---|---|---|
Base | source | Source object to copy the contents from. |
Overrides
Remarks
Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is
destination.Assign(source);
which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.
See Also
CalcHeight()
Calculates the object's height.
Declaration
public override float CalcHeight()
Returns
Type | Description |
---|---|
System.Single | Actual object's height, in pixels. |
Overrides
Remarks
Applicable to objects that contain several text lines, such as TextObject. Returns the height needed to display all the text lines.
Draw(FRPaintEventArgs)
Declaration
public override void Draw(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e |
Overrides
GetTable()
Declaration
public TableObject GetTable()
Returns
Type | Description |
---|---|
TableObject |
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).