Style

Overview

Style is a class in Aspose.Cells FOSS for C++.

Represents a mutable cell style facade that can be applied to one or more cells.

This class provides 46 methods for working with Style objects in C++ programs. Available methods include: Borders, Clone, Color, FillPattern, Font, FromCore, GetBackgroundColor, GetBorders, GetCustom, GetFont, GetForegroundColor, GetHorizontalAlignment, and 33 additional methods. All public members are accessible to any C++ application after installing the Aspose.Cells FOSS for C++ package. Accessor methods: Borders, Color, FillPattern, Font, HorizontalAlignmentType, VerticalAlignmentType.

Accessor Methods

NameTypeAccessDescription
FontFontReadGets the font.
BordersBordersReadGets the borders.
FillPatternFillPatternReadGets the fill pattern.
ColorColorReadGets the color.
HorizontalAlignmentTypeHorizontalAlignmentTypeReadGets the horizontal alignment type.
VerticalAlignmentTypeVerticalAlignmentTypeReadGets the vertical alignment type.

Methods

SignatureDescription
Font()FontGets the font settings.
Borders()BordersGets the border settings.
FillPattern()FillPatternGets the fill pattern.
Color()ColorGets the fill foreground color.
Color()ColorGets the fill background color.
HorizontalAlignmentType()HorizontalAlignmentTypeGets the horizontal alignment.
VerticalAlignmentType()VerticalAlignmentTypeGets the vertical alignment.
GetFont()FontGets the font settings.
SetFont(value: Font)Sets the font settings.
GetBorders()BordersGets the border settings.
SetBorders(value: Borders)Sets the border settings.
GetPattern()FillPatternGets the fill pattern.
SetPattern(value: FillPattern)Sets the fill pattern.
GetForegroundColor()ColorGets the fill foreground color.
SetForegroundColor(value: Color)Sets the fill foreground color.
GetBackgroundColor()ColorGets the fill background color.
SetBackgroundColor(value: Color)Sets the fill background color.
GetNumber()intGets the numeric format identifier.
SetNumber(value: int)Sets the numeric format identifier.
GetCustom()std::stringGets the custom number format code.
SetCustom(value: std::string)Sets the custom number format code.
GetNumberFormat()std::stringGets the resolved number format string.
SetNumberFormat(value: std::string)Sets the number format. Accepts either a built-in format string or a custom format code.
GetHorizontalAlignment()HorizontalAlignmentTypeGets the horizontal alignment.
SetHorizontalAlignment(value: HorizontalAlignmentType)Sets the horizontal alignment.
GetVerticalAlignment()VerticalAlignmentTypeGets the vertical alignment.
SetVerticalAlignment(value: VerticalAlignmentType)Sets the vertical alignment.
GetWrapText()boolGets whether text wraps within the cell.
SetWrapText(value: bool)Sets whether text wraps within the cell.
GetIndentLevel()intGets the indentation level.
SetIndentLevel(value: int)Sets the indentation level. Must be between 0 and 250.
GetTextRotation()intGets the text rotation.
SetTextRotation(value: int)Sets the text rotation. Must be between 0 and 180, or 255 for vertical text.
GetShrinkToFit()boolGets whether the cell content shrinks to fit.
SetShrinkToFit(value: bool)Sets whether the cell content shrinks to fit.
GetReadingOrder()intGets the reading order.
SetReadingOrder(value: int)Sets the reading order. Must be 0, 1, or 2.
GetRelativeIndent()intGets the relative indent.
SetRelativeIndent(value: int)Sets the relative indent.
GetIsLocked()boolGets whether the cell is locked when worksheet protection is enabled.
SetIsLocked(value: bool)Sets whether the cell is locked when worksheet protection is enabled.
GetIsHidden()boolGets whether the cell formula is hidden when worksheet protection is enabled.
SetIsHidden(value: bool)Sets whether the cell formula is hidden when worksheet protection is enabled.
Clone()StyleCreates a copy of the current style. The cloned style.
ToCore()Core::StyleValueConverts this style to a Core StyleValue.
FromCore(value: Core::StyleValue)StyleCreates a Style from a Core StyleValue.

See Also

 English