PowerTools ActiveReports for .NET 11.0J
Item(String) プロパティ
使用例 

取得するStyleSheetオブジェクトの名前。
StyleSheetコレクション内の指定した名前を持つStyleSheetオブジェクトを取得します。
構文
'宣言
 
Public Overloads ReadOnly Property Item( _
   ByVal name As String _
) As Style
public Style Item( 
   string name
) {get;}

パラメータ

name
取得するStyleSheetオブジェクトの名前。
使用例
Private void rptGrapeCity_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");
    }
}
Private Sub rptDD_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
参照

関連項目

StyleSheet クラス
StyleSheet メンバ
オーバーロード一覧

 

 


©2003-2017 GrapeCity inc. All rights reserved.