Spread Windows Forms 7.0 Product Documentation
Compose Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > DefaultStyleCollection Class : Compose Method


o
Style object (NamedStyle, StyleInfo, or string name)
destInfo
Destination for the composed StyleInfo object
If Null, creates a new StyleInfo object.

Glossary Item Box

Composes a style using the default styles and a specified StyleInfo object.

Syntax

Visual Basic (Declaration) 
Public Function Compose( _
   ByVal o As Object, _
   ByVal destInfo As StyleInfo _
) As StyleInfo
Visual Basic (Usage)Copy Code
Dim instance As DefaultStyleCollection
Dim o As Object
Dim destInfo As StyleInfo
Dim value As StyleInfo
 
value = instance.Compose(o, destInfo)
C# 
public StyleInfo Compose( 
   object o,
   StyleInfo destInfo
)

Parameters

o
Style object (NamedStyle, StyleInfo, or string name)
destInfo
Destination for the composed StyleInfo object
If Null, creates a new StyleInfo object.

Return Value

StyleInfo object containing the style information

Example

This example composes a style using the default styles and a specified StyleInfo object.
C#Copy Code
FarPoint.Win.Spread.DefaultStyleCollection dsc = new FarPoint.Win.Spread.DefaultStyleCollection();
Object[] myarray = new Object[dsc.Count];
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
foreach(FarPoint.Win.Spread.NamedStyle style in FarPoint.Win.Spread.DefaultStyleCollection.Styles)
{
listBox1.Items.Add(style.Name);
dsc.Compose(style.Name, si);
}
dsc.CopyTo(myarray,0);
Visual BasicCopy Code
Dim dsc As New FarPoint.Win.Spread.DefaultStyleCollection()
Dim style As FarPoint.Win.Spread.NamedStyle
Dim myarray(dsc.Count())
Dim si As New FarPoint.Win.Spread.StyleInfo()
For Each style In dsc.Styles
ListBox1.Items.Add(style.Name)
dsc.Compose(style.Name, si)
Next
dsc.CopyTo(myarray, 0)

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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