Represents all formatting for a table cell.
Shows how to build a table with custom borders.
Shows how to modify the format of rows and cells in a table.
Shows how to modify formatting of a table cell.
#include <Aspose.Words.Cpp/Tables/CellFormat.h>
Public Member Functions | |
void | ClearFormatting () |
Resets to default cell formatting. Does not change the width of the cell. More... | |
SharedPtr< BorderCollection > | get_Borders () |
Gets collection of borders of the cell. More... | |
double | get_BottomPadding () |
Returns or sets the amount of space (in points) to add below the contents of cell. More... | |
bool | get_FitText () |
If true, fits text in the cell, compressing each paragraph to the width of the cell. More... | |
CellMerge | get_HorizontalMerge () |
Specifies how the cell is merged horizontally with other cells in the row. More... | |
double | get_LeftPadding () |
Returns or sets the amount of space (in points) to add to the left of the contents of cell. More... | |
TextOrientation | get_Orientation () |
Returns or sets the orientation of text in a table cell. More... | |
SharedPtr< PreferredWidth > | get_PreferredWidth () |
Returns or sets the preferred width of the cell. More... | |
double | get_RightPadding () |
Returns or sets the amount of space (in points) to add to the right of the contents of cell. More... | |
SharedPtr< Shading > | get_Shading () |
Returns a Shading object that refers to the shading formatting for the cell. More... | |
double | get_TopPadding () |
Returns or sets the amount of space (in points) to add above the contents of cell. More... | |
CellVerticalAlignment | get_VerticalAlignment () |
Returns or sets the vertical alignment of text in the cell. More... | |
CellMerge | get_VerticalMerge () |
Specifies how the cell is merged with other cells vertically. More... | |
double | get_Width () |
Gets the width of the cell in points. More... | |
bool | get_WrapText () |
If true, wrap text for the cell. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | set_BottomPadding (double value) |
Setter for get_BottomPadding. More... | |
void | set_FitText (bool value) |
Setter for get_FitText. More... | |
void | set_HorizontalMerge (CellMerge value) |
Setter for get_HorizontalMerge. More... | |
void | set_LeftPadding (double value) |
Setter for get_LeftPadding. More... | |
void | set_Orientation (TextOrientation value) |
Setter for get_Orientation. More... | |
void | set_PreferredWidth (SharedPtr< PreferredWidth > value) |
Setter for get_PreferredWidth. More... | |
void | set_RightPadding (double value) |
Setter for get_RightPadding. More... | |
void | set_TopPadding (double value) |
Setter for get_TopPadding. More... | |
void | set_VerticalAlignment (CellVerticalAlignment value) |
Setter for get_VerticalAlignment. More... | |
void | set_VerticalMerge (CellMerge value) |
Setter for get_VerticalMerge. More... | |
void | set_Width (double value) |
Setter for get_Width. More... | |
void | set_WrapText (bool value) |
Setter for get_WrapText. More... | |
void | SetPaddings (double leftPadding, double topPadding, double rightPadding, double bottomPadding) |
Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
void Aspose::Words::Tables::CellFormat::ClearFormatting | ( | ) |
Resets to default cell formatting. Does not change the width of the cell.
Shows how to combine the rows from two tables into one.
System::SharedPtr<Aspose::Words::BorderCollection> Aspose::Words::Tables::CellFormat::get_Borders | ( | ) |
Gets collection of borders of the cell.
Shows how to combine the rows from two tables into one.
double Aspose::Words::Tables::CellFormat::get_BottomPadding | ( | ) |
Returns or sets the amount of space (in points) to add below the contents of cell.
Shows how to format cells with a document builder.
bool Aspose::Words::Tables::CellFormat::get_FitText | ( | ) |
If true, fits text in the cell, compressing each paragraph to the width of the cell.
Shows how to build a table with custom borders.
Aspose::Words::Tables::CellMerge Aspose::Words::Tables::CellFormat::get_HorizontalMerge | ( | ) |
Specifies how the cell is merged horizontally with other cells in the row.
Shows how to merge table cells horizontally.
Prints the horizontal and vertical merge type of a cell.
double Aspose::Words::Tables::CellFormat::get_LeftPadding | ( | ) |
Returns or sets the amount of space (in points) to add to the left of the contents of cell.
Shows how to format cells with a document builder.
Aspose::Words::TextOrientation Aspose::Words::Tables::CellFormat::get_Orientation | ( | ) |
Returns or sets the orientation of text in a table cell.
Shows how to build a table with custom borders.
Shows how to build a formatted 2x2 table.
System::SharedPtr<Aspose::Words::Tables::PreferredWidth> Aspose::Words::Tables::CellFormat::get_PreferredWidth | ( | ) |
Returns or sets the preferred width of the cell.
The preferred width (along with the table's Auto Fit option) determines how the actual width of the cell is calculated by the table layout algorithm. Table layout can be performed by Aspose.Words when it saves the document or by Microsoft Word when it displays the document.
The preferred width can be specified in points or in percent. The preferred width can also be specified as "auto", which means no preferred width is specified.
The default value is Auto.
Shows how to set a preferred width for table cells.
double Aspose::Words::Tables::CellFormat::get_RightPadding | ( | ) |
Returns or sets the amount of space (in points) to add to the right of the contents of cell.
Shows how to format cells with a document builder.
System::SharedPtr<Aspose::Words::Shading> Aspose::Words::Tables::CellFormat::get_Shading | ( | ) |
Returns a Shading object that refers to the shading formatting for the cell.
Shows how to build a table with custom borders.
Shows how to modify the format of rows and cells in a table.
double Aspose::Words::Tables::CellFormat::get_TopPadding | ( | ) |
Returns or sets the amount of space (in points) to add above the contents of cell.
Shows how to format cells with a document builder.
Aspose::Words::Tables::CellVerticalAlignment Aspose::Words::Tables::CellFormat::get_VerticalAlignment | ( | ) |
Returns or sets the vertical alignment of text in the cell.
Shows how to build a table with custom borders.
Aspose::Words::Tables::CellMerge Aspose::Words::Tables::CellFormat::get_VerticalMerge | ( | ) |
Specifies how the cell is merged with other cells vertically.
Cells can only be merged vertically if their left and right boundaries are identical.
When cells are vertically merged, the display areas of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell and all other vertically merged cells must be empty.
Shows how to merge table cells vertically.
Prints the horizontal and vertical merge type of a cell.
double Aspose::Words::Tables::CellFormat::get_Width | ( | ) |
Gets the width of the cell in points.
The width is calculated by Aspose.Words on document loading and saving. Currently, not every combination of table, cell and document properties is supported. The returned value may not be accurate for some documents. It may not exactly match the cell width as calculated by MS Word when the document is opened in MS Word.
Setting this property is not recommended. There is no guarantee that the cell will actually have the set width. The width may be adjusted to accommodate cell contents in an auto-fit table layout. Cells in other rows may have conflicting width settings. The table may be resized to fit into the container or to meet table width settings. Consider using PreferredWidth for setting the cell width. Setting this property sets PreferredWidth implicitly since version 15.8.
Shows how to build a table with custom borders.
Shows how to format cells with a document builder.
bool Aspose::Words::Tables::CellFormat::get_WrapText | ( | ) |
If true, wrap text for the cell.
Shows how to build a table with custom borders.
|
overridevirtual |
|
overridevirtual |
void Aspose::Words::Tables::CellFormat::set_BottomPadding | ( | double | value | ) |
void Aspose::Words::Tables::CellFormat::set_FitText | ( | bool | value | ) |
Setter for Aspose::Words::Tables::CellFormat::get_FitText.
void Aspose::Words::Tables::CellFormat::set_HorizontalMerge | ( | Aspose::Words::Tables::CellMerge | value | ) |
void Aspose::Words::Tables::CellFormat::set_LeftPadding | ( | double | value | ) |
void Aspose::Words::Tables::CellFormat::set_Orientation | ( | Aspose::Words::TextOrientation | value | ) |
void Aspose::Words::Tables::CellFormat::set_PreferredWidth | ( | System::SharedPtr< Aspose::Words::Tables::PreferredWidth > | value | ) |
void Aspose::Words::Tables::CellFormat::set_RightPadding | ( | double | value | ) |
void Aspose::Words::Tables::CellFormat::set_TopPadding | ( | double | value | ) |
void Aspose::Words::Tables::CellFormat::set_VerticalAlignment | ( | Aspose::Words::Tables::CellVerticalAlignment | value | ) |
void Aspose::Words::Tables::CellFormat::set_VerticalMerge | ( | Aspose::Words::Tables::CellMerge | value | ) |
void Aspose::Words::Tables::CellFormat::set_Width | ( | double | value | ) |
Setter for Aspose::Words::Tables::CellFormat::get_Width.
void Aspose::Words::Tables::CellFormat::set_WrapText | ( | bool | value | ) |
Setter for Aspose::Words::Tables::CellFormat::get_WrapText.
void Aspose::Words::Tables::CellFormat::SetPaddings | ( | double | leftPadding, |
double | topPadding, | ||
double | rightPadding, | ||
double | bottomPadding | ||
) |
Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell.
Shows how to pad the contents of a cell with whitespace.
|
static |