Represents a value and its unit of measure that is used to specify the preferred width of a table or a cell.
Preferred width can be specified as a percentage, number of points or a special "none/auto" value.
The instances of this class are immutable.
Shows how to set a table to auto fit to 50% of the width of the page.
Shows how to set a preferred width for table cells.
#include <Aspose.Words.Cpp/Tables/PreferredWidth.h>
Public Member Functions | |
bool | Equals (SharedPtr< PreferredWidth > other) |
Determines whether the specified PreferredWidth is equal in value to the current PreferredWidth. More... | |
bool | Equals (SharedPtr< Object > obj) override |
Determines whether the specified object is equal in value to the current object. More... | |
PreferredWidthType | get_Type () const |
Gets the unit of measure used for this preferred width value. More... | |
double | get_Value () const |
Gets the preferred width value. The unit of measure is specified in the Type property. More... | |
int32_t | GetHashCode () const override |
Serves as a hash function for this type. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
String | ToString () const override |
Returns a user-friendly string that displays the value of this object. More... | |
Static Public Member Functions | |
static SharedPtr< PreferredWidth > & | Auto () |
Returns an instance that represents the "preferred width is not specified" value. More... | |
static SharedPtr< PreferredWidth > | FromPercent (double percent) |
A creation method that returns a new instance that represents a preferred width specified as a percentage. More... | |
static SharedPtr< PreferredWidth > | FromPoints (double points) |
A creation method that returns a new instance that represents a preferred width specified using a number of points. More... | |
static const TypeInfo & | Type () |
|
static |
Returns an instance that represents the "preferred width is not specified" value.
Shows how to set a preferred width for table cells.
bool Aspose::Words::Tables::PreferredWidth::Equals | ( | System::SharedPtr< Aspose::Words::Tables::PreferredWidth > | other | ) |
Determines whether the specified PreferredWidth is equal in value to the current PreferredWidth.
Shows how to set a preferred width for table cells.
|
override |
Determines whether the specified object is equal in value to the current object.
Shows how to set a preferred width for table cells.
|
static |
A creation method that returns a new instance that represents a preferred width specified as a percentage.
percent | The value must be from 0 to 100. |
Shows how to set a table to auto fit to 50% of the width of the page.
Shows how to set a preferred width for table cells.
|
static |
A creation method that returns a new instance that represents a preferred width specified using a number of points.
points | The value must be from 0 to 22 inches (22 * 72 points). |
Shows how to set a preferred width for table cells.
Shows how to use unit conversion tools while specifying a preferred width for a cell.
Aspose::Words::Tables::PreferredWidthType Aspose::Words::Tables::PreferredWidth::get_Type | ( | ) | const |
Gets the unit of measure used for this preferred width value.
Shows how to verify the preferred width type and value of a table cell.
double Aspose::Words::Tables::PreferredWidth::get_Value | ( | ) | const |
Gets the preferred width value. The unit of measure is specified in the Type property.
Shows how to verify the preferred width type and value of a table cell.
|
overridevirtual |
Serves as a hash function for this type.
Shows how to set a preferred width for table cells.
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Returns a user-friendly string that displays the value of this object.
Shows how to set a preferred width for table cells.
Reimplemented from System::Object.
|
static |