Hello. I have two multiline textboxes separated within a splitContainer. When I drag the splitter left or right I would like the textboxes to resize accordingly. How do I do this? I am using Microsoft Visual C# 2008 Express Edition. Thanks.
A:
Hi Jim,
I believe all you need to do is set the anchor property to Top, Left, Bottom, Right true.
Control..::.Anchor Property
Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent.
Chris Kannon
2010-01-22 20:42:34
+1
A:
If you set the Dock property of textboxes to Dock.Fill, this should happen for you.
codekaizen
2010-01-22 20:42:36
Thanks for the tip, kaizen!
Jim Fell
2010-01-22 20:47:46
This is only true if the text boxes fill the panels they are children of.
Chris Kannon
2010-01-22 20:46:33
A:
Two ways:
- Set the Textbox.Anchor property to Top, Left, Bottom and Right.
- Set the Textbox.Dock property to Fill.
Ken
2010-01-22 20:44:22