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 enumDataControl Typ : short
{
DataControlTyp_ Yes = -1,
DataControlTyp_ None = 0,
DataControlTyp_ Yes_xxx = 1
}
public class myTextbox : System.Windows. Forms.TextBox
{
protected enumDataControl Typ m_tDataControlT yp = enumDataControl Typ.DataControl Typ_Yes_xxx;
public enumDataControl Typ DataControlTyp
{
get { return m_tDataControlT yp; }
set { m_tDataControlT yp = value; }
}
}
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 enumDataControl Typ : short
{
DataControlTyp_ Yes = -1,
DataControlTyp_ None = 0,
DataControlTyp_ Yes_xxx = 1
}
public class myTextbox : System.Windows. Forms.TextBox
{
protected enumDataControl Typ m_tDataControlT yp = enumDataControl Typ.DataControl Typ_Yes_xxx;
public enumDataControl Typ DataControlTyp
{
get { return m_tDataControlT yp; }
set { m_tDataControlT yp = value; }
}
}
Comment