A collection of TextColumn objects that represent all the columns of text in a section of a document.
Use SetCount() to set the number of text columns.
To make all columns equal width and spaced evenly, set EvenlySpaced to true and specify the amount of space between the columns in Spacing. MS Word will automatically calculate column widths.
If you have EvenlySpaced set to false, you need to specify width and spacing for each column individually. Use the indexer to access individual TextColumn objects.
When using custom column widths, make sure the sum of all column widths and spacings between them equals page width minus left and right page margins.
Shows how to create multiple evenly spaced columns in a section.
#include <Aspose.Words.Cpp/TextColumnCollection.h>
Public Member Functions | |
int32_t | get_Count () |
Gets the number of columns in the section of a document. More... | |
bool | get_EvenlySpaced () |
True if text columns are of equal width and evenly spaced. More... | |
bool | get_LineBetween () |
When true, adds a vertical line between columns. More... | |
double | get_Spacing () |
When columns are evenly spaced, gets or sets the amount of space between each column in points. More... | |
double | get_Width () |
When columns are evenly spaced, gets the width of the columns. More... | |
virtual const TypeInfo & | GetType () const override |
SharedPtr< TextColumn > | idx_get (int32_t index) |
Returns a text column at the specified index. More... | |
virtual bool | Is (const TypeInfo &target) const override |
void | set_EvenlySpaced (bool value) |
Setter for get_EvenlySpaced. More... | |
void | set_LineBetween (bool value) |
Setter for get_LineBetween. More... | |
void | set_Spacing (double value) |
Setter for get_Spacing. More... | |
void | SetCount (int32_t newCount) |
Arranges text into the specified number of text columns. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
int32_t Aspose::Words::TextColumnCollection::get_Count | ( | ) |
Gets the number of columns in the section of a document.
bool Aspose::Words::TextColumnCollection::get_EvenlySpaced | ( | ) |
True if text columns are of equal width and evenly spaced.
Shows how to create unevenly spaced columns.
bool Aspose::Words::TextColumnCollection::get_LineBetween | ( | ) |
When true, adds a vertical line between columns.
Shows how to separate columns with a vertical line.
double Aspose::Words::TextColumnCollection::get_Spacing | ( | ) |
When columns are evenly spaced, gets or sets the amount of space between each column in points.
Shows how to create multiple evenly spaced columns in a section.
double Aspose::Words::TextColumnCollection::get_Width | ( | ) |
When columns are evenly spaced, gets the width of the columns.
Has effect only when EvenlySpaced is set to true.
|
overridevirtual |
Reimplemented from System::Object.
System::SharedPtr<Aspose::Words::TextColumn> Aspose::Words::TextColumnCollection::idx_get | ( | int32_t | index | ) |
Returns a text column at the specified index.
Shows how to create unevenly spaced columns.
|
overridevirtual |
Reimplemented from System::Object.
void Aspose::Words::TextColumnCollection::set_EvenlySpaced | ( | bool | value | ) |
void Aspose::Words::TextColumnCollection::set_LineBetween | ( | bool | value | ) |
void Aspose::Words::TextColumnCollection::set_Spacing | ( | double | value | ) |
Setter for Aspose::Words::TextColumnCollection::get_Spacing.
void Aspose::Words::TextColumnCollection::SetCount | ( | int32_t | newCount | ) |
Arranges text into the specified number of text columns.
When EvenlySpaced is false and you increase the number of columns, new TextColumn objects are created with zero width and spacing. You need to set width and spacing for the new columns.
newCount | The number of columns the text is to be arranged into. |
Shows how to create multiple evenly spaced columns in a section.
|
static |