clemenslinders
Programmer
LS,
I'm using VS 2005 C#. I created a new component that inherits form textbox. I added a Label to this textbox.
private Label tBLabel;
[Description("Label above Textbox.")]
public Label TBLabel
{
get { return tBLabel; }
set { tBLabel = value; }
}
private void InitializeTB()
{
tBLabel = new Label();
}
I can use my new component.
In the properties box I can see TBLabel
I can change the properties for TBLabel (for instance change it's Text to: This is a label)
But when I run the program the debugger shows me that textbox1.TBLabel.Text=empty
Probably the problem is that I during initialization I have to state tBLabel = new Label(); If I do not use this line I get an error.
Does anyone know how I can overcome this problem??
My guess is that it should be possible.
Kind regards,
Clemens Linders
I'm using VS 2005 C#. I created a new component that inherits form textbox. I added a Label to this textbox.
private Label tBLabel;
[Description("Label above Textbox.")]
public Label TBLabel
{
get { return tBLabel; }
set { tBLabel = value; }
}
private void InitializeTB()
{
tBLabel = new Label();
}
I can use my new component.
In the properties box I can see TBLabel
I can change the properties for TBLabel (for instance change it's Text to: This is a label)
But when I run the program the debugger shows me that textbox1.TBLabel.Text=empty
Probably the problem is that I during initialization I have to state tBLabel = new Label(); If I do not use this line I get an error.
Does anyone know how I can overcome this problem??
My guess is that it should be possible.
Kind regards,
Clemens Linders