K
kjqua
Hi,
I build a control with method and property, and one specific method.
The InitLayout() see below.
protected override void InitLayout()
{
// base.InitLayout();
if (DesignMode)
{
// I'm DesigneMode
string NomeControllo = ??? ;
label1.ForeColor = Color.Green;
label1.BackColor = Color.Yellow;
label1.Text = "Designe mode" + NomeControllo;
}
else
{ // Not DesigneMode
// Do something
}
}
My target is retrieve the name of my control ( name type in the
Property Panel ) anther i drag my controll in a Form.
Example:
i Name my control "Pippo"
Then when on the Form, in the DesigneMode, i will like to retrieve
the name of the control that i have insert.
I build a control with method and property, and one specific method.
The InitLayout() see below.
protected override void InitLayout()
{
// base.InitLayout();
if (DesignMode)
{
// I'm DesigneMode
string NomeControllo = ??? ;
label1.ForeColor = Color.Green;
label1.BackColor = Color.Yellow;
label1.Text = "Designe mode" + NomeControllo;
}
else
{ // Not DesigneMode
// Do something
}
}
My target is retrieve the name of my control ( name type in the
Property Panel ) anther i drag my controll in a Form.
Example:
i Name my control "Pippo"
Then when on the Form, in the DesigneMode, i will like to retrieve
the name of the control that i have insert.