.
In Depth Banner
Skip Navigation Links

Select your preferred language

The TextFormatterTest application.

using System;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data;

 

namespace TextFormatterTest

{

  /// <summary>

  /// Summary description for Form1.

  /// </summary>

  public class Form1 : System.Windows.Forms.Form

  {

    private WellFormed.TextPanel textPanel1;

    /// <summary>

    /// Required designer variable.

    /// </summary>

    private System.ComponentModel.Container components = null;

 

    public Form1()

    {

      //

      // Required for Windows Form Designer support

      //

      InitializeComponent();

 

      //

      // TODO: Add any constructor code after InitializeComponent call

      //

    }

 

    /// <summary>

    /// Clean up any resources being used.

    /// </summary>

    protected override void Dispose( bool disposing )

    {

      if( disposing )

      {

        if (components != null)

        {

          components.Dispose();

        }

      }

      base.Dispose( disposing );

    }

 

    #region Windows Form Designer generated code

    /// <summary>

    /// Required method for Designer support - do not modify

    /// the contents of this method with the code editor.

    /// </summary>

    private void InitializeComponent()

    {

      this.textPanel1 = new WellFormed.TextPanel();

      this.SuspendLayout();

      //

      // textPanel1

      //

      this.textPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)

        | System.Windows.Forms.AnchorStyles.Left)

        | System.Windows.Forms.AnchorStyles.Right)));

      this.textPanel1.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));

      this.textPanel1.JustificationStyle = WellFormed.JustificationStyles.Left;

      this.textPanel1.Location = new System.Drawing.Point(16, 16);

      this.textPanel1.Name = "textPanel1";

      this.textPanel1.ShowWhiteSpace = true;

      this.textPanel1.Size = new System.Drawing.Size(600, 264);

      this.textPanel1.StandardTabs = 48F;

      this.textPanel1.TabIndex = 0;

      this.textPanel1.Tabs = new System.Single[] {

                               0F,

                               48F,

                               96F,

                               144F,

                               192F,

                               240F,

                               288F,

                               336F,

                               384F,

                               432F,

                               480F,

                               528F,

                               576F};

      this.textPanel1.Text = @"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla facilisi. Quisque dolor leo, sollicitudin a, porta vel, faucibus id, nunc. Suspendisse mollis nonummy tellus. Sed auctor pulvinar odio. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin lorem lacus, mattis et, cursus ut, viverra faucibus, purus. Sed feugiat mauris quis velit. Etiam iaculis hendrerit urna. Vivamus volutpat dui vel est. Sed dictum est in metus. Nullam facilisis aliquet turpis. Duis varius enim ut orci. Donec lorem ligula, pellentesque ac, sodales at, ornare non, lacus. Vivamus rutrum aliquam leo. ";

      //

      // Form1

      //

      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);

      this.ClientSize = new System.Drawing.Size(640, 294);

      this.Controls.Add(this.textPanel1);

      this.Name = "Form1";

      this.Text = "Form1";

      this.ResumeLayout(false);

 

    }

    #endregion

 

    /// <summary>

    /// The main entry point for the application.

    /// </summary>

    [STAThread]

    static void Main()

    {

      Application.Run(new Form1());

    }

  }

}

 

Return to the article.

 

Copyright © Bob Powell 2000-.  All rights reserved.