|
Sets the default cell style when a cell is added.
Syntax 1
SetDefaultStyle(
"row",
styleNames
[,row]
)
Parameters
areaType
|
|
Type:
|
character
|
|
"row"
|
styleNames
|
|
Type:
|
Character Array
|
|
A one-dimensional array of style names. Specify the number of elements as many as the number of rows you want to specify. You can add multiple styles by separating the style names with commas.
|
row
|
|
Type:
|
Number
|
|
Index of the starting row (column number starting from 0).
|
Return Value
none
Explanation
If you set a style to be applied when a column is added, each cell will automatically have the specified style when you add a column using the AddCol / InsertCol method or the Cols property. The style is only applied when a column is added, so if you specify 0 in the Cols property before calling this method and then add a column after this method, the style will be set for all cells.Before setting the style for a row with the method, the number of arrays specified by styleNames isRows You must specify the number of rows in the properties beforehand.
example)
this.Cols = 0;
this.Rows = 5;
this.SetDefaultStyle("row", c("styleLabel", "styleButton", "styleSideButton", "styleSwitch", "styleFill"));
this.AddCol(5);
|
Syntax 2
SetDefaultStyle(
"col",
styleNames
[,col]
)
Parameters
areaType
|
|
Type:
|
character
|
|
"col"
|
styleNames
|
|
Type:
|
Character Array
|
|
A one-dimensional array of style names. Specify the number of elements as many as the number of columns you want to specify. You can add multiple styles by separating the style names with commas.
|
col
|
|
Type:
|
Number
|
|
The starting column index (0-based).
|
Return Value
none
Explanation
If you set a style that is applied when a row is added, each cell will automatically have the specified style when a row is added using the AddRow / InsertRow method or the Rows property. The style is only applied when a row is added, so if you specify 0 in the Rows property before calling this method and then add a row after this method, the style will be set for all cells.Before setting the style for a column with the method, the number of arrays specified by styleNames isCols You must specify the number of rows in the properties beforehand.
example)
this.Cols = 5;
this.Rows = 0;
this.SetDefaultStyle("col", c("styleCombo", "styleButton", "styleSideButton", "styleSwitch, styleFill"));
this.AddRow(5);
|
Syntax 3
SetDefaultStyle(
"all",
styleName
)
Parameters
areaType
|
|
Type:
|
character
|
|
"all"
|
styleName
|
|
Type:
|
character
|
|
The style name.
|
Return Value
none
Explanation
If you set a style that is applied to the entire cell, when you add a cell using the AddRow / InsertRow / AddCol / InsertCol method or the Rows / Cols property, each cell will automatically adopt the specified style. Since the style is only applied when adding a row/column, you can set the style to all cells by specifying 0 in the Rows / Cols property before calling this method and then adding the row/column after this method.
*If both "all" and "col" (or "all" and "row") are defined, "col" (or "row") will take precedence.
example)
this.Cols = 0;
this.Rows = 0;
this.SetDefaultStyle("all", "styleEdit");
this.AddCols(5);
this.AddRow(5);
|
reference
AddStyle
SetDefaultStyle
SetCellStyle
ClearStyle
SetCellType
SetCellProperty
GetCellProperty
SetColProperty
GetColProperty
SetRowProperty
GetRowProperty
SetColWidth
GetColWidth
SetRowHeight
GetRowHeight
SetGridLine
MergeCells
UnmergeCells
|