<< Click to Display Table of Contents >>
マニュアル > コントロールリファレンス > 基本 > グリッドコントロール > メソッド >
セルのスタイルを行もしくは列毎に変更する。
構文1
SetCellStyle(
"row",
styleNames
[,row]
)
パラメータ
areaType
型:
文字
"row"
文字配列
スタイル名の1次元配列。列数分を配列で指定する。スタイル名をカンマで区切ることにより複数のスタイルを設定することが可能。
row
数値
行のインデックス(0から始まる行番号で配列可能)。省略するとすべての行。
戻り値
無し
解説
セルのスタイルを行毎に変更する。
例)
this.SetCellStyle("row", c("styleEdit, styleFill2", "styleEdit, styleFill2", "styleEdit, styleFill2", "styleFill2"), this.GetSelectedRow());
構文2
"col",
[,col]
"col"
スタイル名の1次元配列。行数分を配列で指定する。スタイル名をカンマで区切ることにより複数のスタイルを設定することが可能。
col
列のインデックス(0から始まる列番号で配列可能)。省略するとすべての列。
セルのスタイルを列毎に変更する。
this.SetCellStyle("col", c("styleEdit, styleFill2", "styleEdit, styleFill2", "styleEdit, styleFill2", "styleFill2"), this.GetSelectedCol());
全セルまたは各セル毎に修正したい場合はSetCellPropertyでstyleプロパティを設定します。
例)すべてのセルのスタイルを変更
this.SetCellProperty("all", "style", "styleLabel");
例)現在選択されているセルのスタイルを変更
this.SetCellProperty("cell", "style", "styleLabel", this.GetSelectedCol(), this.GetSelectedRow());
参照
AddStyle
SetDefaultStyle
SetCellStyle
ClearStyle
SetCellType
SetCellProperty
GetCellProperty
SetColProperty
GetColProperty
SetRowProperty
GetRowProperty
SetColWidth
GetColWidth
SetRowHeight
GetRowHeight
SetGridLine
MergeCells
UnmergeCells