Hi,
I am writing a control myTextbox (simply a new class, which inherits class TextBox).
myTextbox class has property DataControlTyp, which is a enumeration: Now when I select this control in design window, I want to see this property as a list (combobox) in property window, to set a value to it.
How can I do it? Following is my code.
Thanks
Nhan
public enum enumDataControlTyp : short
{
DataControlTyp_Yes = -1,
DataControlTyp_None = 0,
DataControlTyp_Yes_xxx = 1
}
public class myTextbox : System.Windows.Forms.TextBox
{
protected enumDataControlTyp m_tDataControlTyp = enumDataControlTyp.DataControlTyp_Yes_xxx;
public enumDataControlTyp DataControlTyp
{
get { return m_tDataControlTyp; }
set { m_tDataControlTyp = value; }
}
}