Class TableColumn
Represents a table column.
Implements
Inherited Members
Namespace: FastReport.Table
Assembly: FastReport.OpenSource.dll
Syntax
public class TableColumn : ComponentBase, IFRSerializable
Remarks
Use the Width property to set the width of a column. If AutoSize property is true, the column will calculate its width automatically.
You can also set the MinWidth and MaxWidth properties to restrict the column's width.
Constructors
TableColumn()
Initializes a new instance of the TableColumn class.
Declaration
public TableColumn()
Properties
AutoSize
Gets or sets a value determines if the column should calculate its width automatically.
Declaration
public bool AutoSize { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Index
Gets the index of this column.
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
KeepColumns
Gets or sets the number of columns to keep on the same page.
Declaration
public int KeepColumns { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Left
Gets or sets the left coordinate of the object in relation to its container.
Declaration
public override float Left { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
Remarks
This property value is measured in the screen pixels. Use Units class to convert a value to desired units.
To obtain absolute coordinate, use AbsLeft property.
MaxWidth
Gets or sets the maximal width for this column, in pixels.
Declaration
public float MaxWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
MinWidth
Gets or sets the minimal width for this column, in pixels.
Declaration
public float MinWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
PageBreak
Gets or sets the page break flag for this column.
Declaration
public bool PageBreak { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Width
Gets or sets a width of the column, in pixels.
Declaration
public override float Width { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
Remarks
The column width cannot exceed the range defined by the MinWidth and MaxWidth properties.
note
To convert between pixels and report units, use the constants defined in the Units class.
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(Base) method.
See Also
Clear()
Clears the object's state.
Declaration
public override void Clear()
Overrides
Remarks
This method also disposes all object's children.
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(Base) methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).