Represents the collection of Style objects used to format controls.
For a list of all members of this type, see StyleSheet members.
Object Model
Inheritance Hierarchy
System.Object
DataDynamics.ActiveReports.StyleSheet
Syntax
[Visual Basic]
Public Class StyleSheet
[C#]
public class StyleSheet
Remarks
You can use this collection to add or modify the styles used in the report and globally modify the formatting of controls in your report.
Example
[C#]
private void rptDataDynamics_ReportStart(object sender, System.EventArgs eArgs) { this.StyleSheet.Add("MyStyle"); this.StyleSheet["MyStyle"].Alignment = TextAlignment.Center; this.StyleSheet["MyStyle"].BackColor = System.Drawing.Color.White; this.StyleSheet["MyStyle"].FontBold = true; this.StyleSheet["MyStyle"].FontItalic = false; this.StyleSheet["MyStyle"].FontName = "Arial"; this.StyleSheet["MyStyle"].FontSize = null; this.StyleSheet["MyStyle"].FontStrikeThrough = false; this.StyleSheet["MyStyle"].FontUnderline = false; this.StyleSheet["MyStyle"].ForeColor = System.Drawing.Color.YellowGreen; Console.WriteLine(this.StyleSheet["MyStyle"].Name.ToString()); Console.WriteLine(this.StyleSheet["MyStyle"].Value.ToString()); this.StyleSheet["MyStyle"].VerticalAlignment = VerticalTextAlignment.Middle; Label1.ClassName = "MyStyle"; if (this.StyleSheet.Count > 10) { this.StyleSheet.Remove("MyStyle"); } } |
[Visual Basic]
Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format
Me.StyleSheet.Add("MyStyle")
Me.StyleSheet("MyStyle").Alignment = TextAlignment.Center
Me.StyleSheet("MyStyle").BackColor = System.Drawing.Color.White
Me.StyleSheet("MyStyle").FontBold = True
Me.StyleSheet("MyStyle").FontItalic = False
Me.StyleSheet("MyStyle").FontName = "Arial"
Me.StyleSheet("MyStyle").FontSize = Nothing
Me.StyleSheet("MyStyle").FontStrikeThrough = False
Me.StyleSheet("MyStyle").FontUnderline = False
Me.StyleSheet("MyStyle").ForeColor = System.Drawing.Color.YellowGreen
Console.WriteLine(Me.StyleSheet("MyStyle").Name.ToString())
Console.WriteLine(Me.StyleSheet("MyStyle").Value.ToString())
Me.StyleSheet("MyStyle").VerticalAlignment = VerticalTextAlignment.Middle
Label1.ClassName = "MyStyle"
If Me.StyleSheet.Count > 10 Then
Me.StyleSheet.Remove("MyStyle")
End If
End Sub |
See Also
StyleSheet Members
| DataDynamics.ActiveReports Namespace
| Style
| ClassName (Label) property
| ClassName (TextBox) Property
Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.