Sure, here it is:
// In the MyRichTextBox class:
namespace SubClassedRichTextBoxDemo
{
class MyRichTextBox : MicroFour.StrataFrame.UI.Windows.Forms.Textbox
{
public MyRichTextBox()
{
BindingEditable = true;
Enabled = true;
Multiline = true;
ReadOnly = true;
ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
}
}
}
// In the form:
using System;
namespace SubClassedRichTextBoxDemo
{
public partial class Form1 : MicroFour.StrataFrame.UI.Windows.Forms.StandardForm
{
public Form1()
{InitializeComponent();}
private void Form1_Load(object sender, EventArgs e)
{string[] Numbers = { "Bothell", "Portland", "Seattle", "Duluth", "Dallas" };
for (int i = 0; i <= 4; i++)
{myRichTextBox1.Text += Numbers[i] + System.Environment.NewLine;}}
private void button1_Click(object sender, EventArgs e)
{ myRichTextBox1.ReadOnly = false; }
private void button2_Click(object sender, EventArgs e)
{ myRichTextBox1.ReadOnly = true; }
}
}
I can also zip up the little app and upload it, if that would be better.
Les