5. Cell style
Cell text styles, color, shadow, size, align, background
-
Dynamic style
Dynamic style is turned on by <Cfg> attribute DynamicStyle
and permits changing style attributes and also undo / redo these actions by users.
It shows also the style buttons on default Toolbar.
-
Text style attributes
Text style is set by bit array in TextStyle
and controls bold font, italic font, line below, line through, line above.
Lower case characters as small caps.
Every the text style setting can be set or cleared individually by appropriate action.
Text and background colors and shadows
Text color is set by TextColor
, background color by Color
.
Text shadow style is set by TextShadow
and / or the text shadow color by TextShadowColor
.
The predefined text colors are in <Cfg> TextColors, background colors in DefaultColors, shadows in TextShadows and shadow colors in TextShadowColors.
All the predefined color lists can be fully customized to contain more, less or different colors. The predefined shadows can be customized in CSS.
Font and size
Font name is set by TextFont
and font size by TextSize
.
The predefined font names are in <Cfg> TextFonts and predefined font sizes in TextSizes.
Both the predefined lists can be fully customized to contain more, less or different items.
Align, wrap and rotate
Horizontal alignment is set by Align
, vertical alignment by VAlign
.
Cell can be rotated by 90 or 270 degrees and is set by Rotate
. Wrapping cell value vertically is set by Wrap
.
Dynamic border
Dynamic border is turned on by <Cfg> attribute DynamicBorder
and permits setting and changing individual cell border width, style and color and also undo / redo these changes.
It also shows the Border button on default toolbar.
The border is set by attributes for specific edge BorderTop
, BorderBottom
, BorderLeft
and BorderRight
.
The border can be modified for every edge or for more or all edges at once.
There are 8 predefined border width and styles in TreeGrid: 0px, 1px solid, 2px solid, 3px solid, 1px dotted, 2px dotted, 1px dashed, 2px dashed. Every border style can have any color.
Dynamic span
Dynamic span is turned on by <Cfg> attribute DynamicSpan
and permits spanning and splitting cells and also undo / redo these changes.
It also shows the Span and Split buttons on default toolbar.
The horizontal span is set by Span
attribute, vertical span by RowSpan
attribute.
Mass changes
All the style, border and span can be affected by mass change like clear cells, move cells, copy cells, auto fill cells, copy & paste cells via clipboard.
To be the attribute affected by the mass change, include in it in EditAttrs
list.