How can i bind a Text property from a textBox to a Width of a panel?
I tried:
panel1.DataBindings.Add("Text", textBox3, "Size.Width");
but it raises exception
Object does not match target type.
EDIT: I want to change the width of panel, as text in textbox is changed.
Try this:
You also should know, that you can’t directly change Size.Width, because of Size is a property, which returns value type, which you can’t change this way. Only to set new Size with new Width.