|
Change cell styles by row or column.
Syntax 1
SetCellStyle(
"row",
styleNames
[,row]
)
Parameters
areaType
|
|
Type:
|
character
|
|
"row"
|
styleNames
|
|
Type:
|
Character Array
|
|
A one-dimensional array of style names. The number of columns is specified in the array. Multiple styles can be set by separating the style names with commas.
|
row
|
|
Type:
|
Number
|
|
Row index (arrayable by row number starting from 0), or all rows if omitted.
|
Return Value
none
Explanation
Change cell style per row.
example)
this.SetCellStyle("row", c("styleEdit, styleFill2", "styleEdit, styleFill2", "styleEdit, styleFill2", "styleFill2"), this.GetSelectedRow());
|
Syntax 2
SetCellStyle(
"col",
styleNames
[,col]
)
Parameters
areaType
|
|
Type:
|
character
|
|
"col"
|
styleNames
|
|
Type:
|
Character Array
|
|
A one-dimensional array of style names. The number of rows is specified in the array. Multiple styles can be set by separating the style names with commas.
|
col
|
|
Type:
|
Number
|
|
Column index (0-based column number, orderable), or all columns if omitted.
|
Return Value
none
Explanation
Change cell style by column.
example)
this.SetCellStyle("col", c("styleEdit, styleFill2", "styleEdit, styleFill2", "styleEdit, styleFill2", "styleFill2"), this.GetSelectedCol());
If you want to modify all cells or each cell, set the style property with SetCellProperty.
Example: Change the style of all cells
this.SetCellProperty("all", "style", "styleLabel");
Example) Change the style of the currently selected cell
this.SetCellProperty("cell", "style", "styleLabel", this.GetSelectedCol(), this.GetSelectedRow());
|

|
If you want to modify all cells or each cell, set the style property with SetCellProperty.
Example: Change the style of all cells
this.SetCellProperty("all", "style", "styleLabel");
Example) Change the style of the currently selected cell
this.SetCellProperty("cell", "style", "styleLabel", this.GetSelectedCol(), this.GetSelectedRow());
|
reference
AddStyle
SetDefaultStyle
SetCellStyle
ClearStyle
SetCellType
SetCellProperty
GetCellProperty
SetColProperty
GetColProperty
SetRowProperty
GetRowProperty
SetColWidth
GetColWidth
SetRowHeight
GetRowHeight
SetGridLine
MergeCells
UnmergeCells
|