3

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.

codekaizen
  • 26,990
  • 7
  • 84
  • 140
Jim Fell
  • 13,750
  • 36
  • 127
  • 202

6 Answers6

5

If you set the Dock property of textboxes to Dock.Fill, this should happen for you.

codekaizen
  • 26,990
  • 7
  • 84
  • 140
1

Two ways:

  1. Set the Textbox.Anchor property to Top, Left, Bottom and Right.
  2. Set the Textbox.Dock property to Fill.
Ken
  • 1,830
  • 3
  • 20
  • 32
0

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
  • 5,931
  • 4
  • 25
  • 35
0

You should Dock them in each panel.

Austin Salonen
  • 49,173
  • 15
  • 109
  • 139
0

Very late to the party but all I did was set dock to fill and Multiline to true and it filled the space.

Eric Scherrer
  • 3,328
  • 1
  • 19
  • 34
-1

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.

Picrofo Software
  • 5,475
  • 3
  • 23
  • 37
dinesh
  • 7
  • 1