ActiveReports 9
FontStrikeThrough Property
Example 

Gets or sets the Font.StrikeThrough property of the control.
Syntax
'Declaration
 
Public Property FontStrikeThrough As System.Object
public System.object FontStrikeThrough {get; set;}

Property Value

A Boolean value. True if the control font should be set to strikethrough; False otherwise.  Null if the property is inherited from the Style parent or not to be set on the control.
Example
Paste inside the ReportStart event.
private void SectionReport1_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");
    }
}
Paste inside the ReportStart event.
Private Sub SectionReport1_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
   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
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

Reference

Style Class
Style Members

 

 


Copyright © 2014 GrapeCity, inc. All rights reserved

Support Forum