Preview

image

  • Word Wrap
  • Colorization and syntax highlighting
  • Text formatting

Usage

// create the control
TextArea myTextArea = new TextArea(new Rectangle(50, 50, 200, 50));

// turn colorization on (syntax highlight/formatting)
myTextArea.Colorize = true;

// create color table
// each code (char) represents which pen (color) we going to use
myTextArea.ColorTable.Add('R', Color.Red);
myTextArea.ColorTable.Add('B', Color.Blue);

// add text:
// \n - new line
// $x - where x is from ColorTable indicates which color we should use
myTextArea.Text = "This is the first line.\n$RThis is red. $BThis is blue.";

// add control to a Window
myWindow.Controls.Add(myTextArea);

Last edited Apr 4, 2012 at 1:01 AM by qisur, version 3

Comments

No comments yet.