FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > INamedStyleSupport Interface : GetDirectName Method |
'Declaration Function GetDirectName( _ ByVal row As Integer, _ ByVal column As Integer _ ) As String
'Usage Dim instance As INamedStyleSupport Dim row As Integer Dim column As Integer Dim value As String value = instance.GetDirectName(row, column)
In terms of precedence of styles, direct cell styles override direct row styles, which override direct column styles, which override model default styles.
In terms of allowed values, for a direct row style, use -1 for the entire column; for a direct column style, use -1 for the entire row; and for a model default style, use -1 for both rows and columns.
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()
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8