Spread Windows Forms 6.0 Product Documentation
Merge(StyleInfo,Boolean) Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > StyleInfo Class > Merge Method : Merge(StyleInfo,Boolean) Method


source
Object whose style settings are merged with the current object
force
Whether to overwrite the current settings with the settings from the merge object

Glossary Item Box

Merges the style settings with the current object with the option to overwrite settings in the current object.

Syntax

Visual Basic (Declaration) 
Public Overloads Overridable Sub Merge( _
   ByVal source As StyleInfo, _
   ByVal force As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As StyleInfo
Dim source As StyleInfo
Dim force As Boolean
 
instance.Merge(source, force)
C# 
public virtual void Merge( 
   StyleInfo source,
   bool force
)

Parameters

source
Object whose style settings are merged with the current object
force
Whether to overwrite the current settings with the settings from the merge object

Remarks

This method gives you the option to overwrite existing settings in the current object. If you set the force parameter to true, settings from the merge object overwrite settings in the current object. Set the force parameter to false if you do not want to overwrite settings in the current object. Set to true to overwrite the current settings.

If you do not need to overwrite the existing settings in the current object, you might want to use the Merge(StyleInfo) method.

Example

This example merges two style objects.
C#Copy Code
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo(); 
si.VisualStyles = true; 
FarPoint.Win.Spread.StyleInfo merge = new FarPoint.Win.Spread.StyleInfo(); 
merge.BackColor = Color.Red; 
fpSpread1.ActiveSheet.DefaultStyle = si; 
si.Merge(merge, true);
Visual BasicCopy Code
Dim si As New FarPoint.Win.Spread.StyleInfo
si.VisualStyles = True
Dim merge As New FarPoint.Win.Spread.StyleInfo
merge.BackColor = Color.Red
FpSpread1.ActiveSheet.DefaultStyle = si
si.Merge(merge, True)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.