FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > StyleInfo Class > Merge Method : Merge(Object,Boolean) Method |
'Declaration Public Overloads Overridable Function Merge( _ ByVal obj As Object, _ ByVal force As Boolean _ ) As Boolean
The Merge(Object, Boolean) method gives you the option to overwrite existing settings in the current object. If you set the fForce parameter to True, settings from the merge object overwrite settings in the current object. Set the fForce parameter to False if you do not want to overwrite settings in the current object.
If you do not need to overwrite the existing settings in the current object, you might want to use the Merge(Object) method.
FarPoint.Web.Spread.StyleInfo info = new FarPoint.Web.Spread.StyleInfo(); FarPoint.Web.Spread.StyleInfo minfo = new FarPoint.Web.Spread.StyleInfo(); minfo.BackColor = Color.Yellow; info.ForeColor = Color.Red; info.Font.Bold = true; info.Merge(minfo, true); FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, info); bool bol; bol = info.IsPropertySet(FarPoint.Web.Spread.SheetStyleProperty.BackColor); ListBox1.Items.Add(Convert.ToString(bol));
Dim info As New FarPoint.Web.Spread.StyleInfo() Dim minfo As New FarPoint.Web.Spread.StyleInfo() Dim prop As FarPoint.Web.Spread.SheetStyleProperty minfo.BackColor = Color.Yellow info.ForeColor = Color.Red info.Font.Bold = True info.Merge(minfo, True) FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, info) Dim bol As Boolean bol = info.IsPropertySet(prop.BackColor) ListBox1.Items.Add(bol)
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6