R
Ryan
How do I override a Readonly property of a textbox control in a custom
Textbox control?
Textbox control?
I have created a custom Textbox control. When this control is placed on a
form; the ReadOnly property is not available.
I have implemented some properties, code below, but don't know exactly how
to implement Readonly property:
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace MyControls
{
public partial class MyTextBox : UserControl
{
public string currentText;
public delegate void TextChangedHandler(object MyTextBox,EventArgs e);
public event TextChangedHandler OnTextChange;
public MyTextBox()
{
InitializeComponent();
baseTextBox.Text = "";
}
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
}
protected override void OnLostFocus(EventArgs e)
{
base.OnLostFocus(e);
}
- Show quoted text -