パラメータ
- row
- モデル内のセルの行インデックス。列全体またはモデルデフォルトを指定する場合は-1を指定します。
- column
- モデル内のセルの列インデックス。行全体またはモデルデフォルトを指定する場合は-1を指定します。
戻り値の型
指定したセル、列、行、またはモデル デフォルトのスタイルの名前を含む
String。指定したセル、列、行、またはモデル デフォルトに名前付きスタイルが割り当てられていない場合は、空の文字列
次のサンプルコードは、セルの背景色の変更に使用する名前付きスタイルの名前を返します。
FarPoint.Win.Spread.Model.INamedStyleSupport ins;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
ns.BackColor = Color.LightBlue;
fpSpread1.NamedStyles.Add(ns);
ins = (FarPoint.Win.Spread.Model.INamedStyleSupport)fpSpread1.ActiveSheet.Models.Style;
ins.SetDirectName(1, 1, "StyleData");
label1.Text = "The name of the style used to change the color in the cell is " + ins.GetDirectName(1, 1).ToString();
Dim ins As FarPoint.Win.Spread.Model.INamedStyleSupport
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
ins = FpSpread1.ActiveSheet.Models.Style
ins.SetDirectName(1, 1, "StyleData")
Label1.Text = "The name of the style used to change the color in the cell is " & ins.GetDirectName(1, 1).ToString()