I have a TextBox which I would like to have stretch to its parent's Width.
I tried anchoring Top, Left, Right but that only goes just over about 60%, any ideas?
As Hans Passant said in a comment, but anchor to the left as well.
Or, if you want to do it programmatically:
textBox1.Width = textBox1.Parent.Width;
textBox1.Location = new Point(0,textBox1.Location.Y);
textBox1.Anchor = AnchorStyles.Left | AnchorStyles.Right;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With