Friday, January 4, 2008 #

UserControl actually has OnTextChanged event

 Wow, didn't know that adding

[Browsable(true), EditorBrowsable(EditorBrowsableState.Always)]
new public event EventHandler TextChanged
{
add {base.TextChanged += value;}
remove {base.TextChanged -= value;}
}

and

private void txtbox1_TextChanged(object sender, EventArgs e)
{base.OnTextChanged(e);}

Actually gives a textbox based usercontrol a TextChanged event at design time, much nicer than other methods i've used previously.

Posted On Friday, January 4, 2008 4:19 PM | Comments (3)

Copyright © Neil Smith

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski