Aspose::Cells::Border class
Contents
[
Hide
]Border class
Encapsulates the object that represents the cell border.
class Border
Methods
Method | Description |
---|---|
Border(Border_Impl* impl) | Constructs from an implementation object. |
Border(const Border& src) | Copy constructor. |
GetArgbColor() | Gets and sets the color with a 32-bit ARGB value. |
GetColor() | Gets or sets the Color of the border. |
GetLineStyle() | Gets or sets the cell border type. |
GetThemeColor() | Gets and sets the theme color of the border. |
IsNull() const | Checks whether the implementation object is nullptr. |
explicit operator bool() const | operator bool() |
operator=(const Border& src) | operator= |
SetArgbColor(int32_t value) | Gets and sets the color with a 32-bit ARGB value. |
SetColor(const Aspose::Cells::Color& value) | Gets or sets the Color of the border. |
SetLineStyle(CellBorderType value) | Gets or sets the cell border type. |
SetThemeColor(const ThemeColor& value) | Gets and sets the theme color of the border. |
~Border() | Destructor. |
Fields
Field | Description |
---|---|
_impl | The implementation object. |
Examples
Aspose::Cells::Startup();
Workbook workbook;
WorksheetCollection sheets = workbook.GetWorksheets();
Cell cell = sheets.Get(0).GetCells().Get(u"A1");
Style style = cell.GetStyle();
//Set top border style and color
Border border = style.GetBorders().Get(BorderType::TopBorder);
border.SetLineStyle(CellBorderType::Medium);
border.SetColor(Color{ 0xff, 0xff, 0, 0 });//Red
cell.SetStyle(style);
Aspose::Cells::Cleanup();
See Also
- Namespace Aspose::Cells
- Library Aspose.Cells for C++