GrapeCity.Win.Buttons 名前空間 > GcLabel クラス : TextDecorations プロパティ |
Public Property TextDecorations As TextDecorations
public TextDecorations TextDecorations {get; set;}
次のサンプルコードは、TextDecorations プロパティの使用方法と GcLabel コントロールの作成方法を示します。
private void GcLabelTextDecorations() { // Create a instance of GcLabel. GrapeCity.Win.Buttons.GcLabel gcLabel1 = new GrapeCity.Win.Buttons.GcLabel(); // Initialize the Name, Location and Size of GcLabel gcLabel1.Name = "gcLabel1"; gcLabel1.Location = new System.Drawing.Point(0, 0); gcLabel1.Size = new System.Drawing.Size(200, 50); // Set TextDecorations gcLabel1.Font = new Font("Microsoft Sans Serif", 18.25f); gcLabel1.Text = "0123456789"; gcLabel1.TextAlign = ContentAlignment.MiddleCenter; Buttons.TextDecorations textDecoration = new Buttons.TextDecorations(); textDecoration.StrikethroughStyle = GrapeCity.Win.Buttons.TextLineStyle.Single; textDecoration.StrikethroughColor = Color.Red; textDecoration.TextBorderStyle = GrapeCity.Win.Buttons.TextBorderStyle.Single; textDecoration.UnderlineStyle = GrapeCity.Win.Buttons.TextLineStyle.Single; textDecoration.UnderlineColor = Color.Red; gcLabel1.TextDecorations = textDecoration; // Add gcLabel1 to the form this.Controls.Add(gcLabel1); }
Private Sub GcLabelTextDecorations() ' Create a instance of GcLabel. Dim gcLabel1 As New GcLabel() ' Initialize the Name, Location and Size of GcLabel gcLabel1.Name = "gcLabel1" gcLabel1.Location = New System.Drawing.Point(0, 0) gcLabel1.Size = New System.Drawing.Size(200, 50) ' Set TextDecorations gcLabel1.Font = New Font("Microsoft Sans Serif", 18.25F) gcLabel1.Text = "0123456789" gcLabel1.TextAlign = ContentAlignment.MiddleCenter Dim textDecorations As New TextDecorations() textDecorations.StrikethroughStyle = TextLineStyle.[Single] textDecorations.StrikethroughColor = Color.Red textDecorations.TextBorderStyle = TextBorderStyle.[Single] textDecorations.UnderlineStyle = TextLineStyle.[Single] textDecorations.UnderlineColor = Color.Red gcLabel1.TextDecorations = textDecorations ' Add gcLabel1 to the form Me.Controls.Add(gcLabel1) End Sub
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