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开发者_开发问答.
If you set the Dock property of textboxes to Dock.Fill, this should happen for you.
Two ways:
- Set the Textbox.Anchor property to Top, Left, Bottom and Right.
- Set the Textbox.Dock property to Fill.
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.
You should Dock them in each panel.
Very late to the party but all I did was set dock to fill and Multiline to true and it filled the space.
Just set the TextBox
style like this
.MultiLineTextBox
{
max-height: 52px;
max-width: 163px;
min-height: 52px;
min-width: 163px;
}
<asp:TextBox ID="txtremark" runat="server" CssClass ="MultiLineTextBox"
and enjoy.
精彩评论