14
I want the text box to stay a certain distance from the top, bottom, left, and right edges of the parent form, and to stretch as the window does.
Currently I have:
private void Form1_SizeChanged(object sender, EventArgs e)
{
richTextBox1.Size = new System.Drawing.Size(this.ClientSize.Width - 24, richTextBox1.Size.Height);
}
...for the width, but I'm wondering if that's the right way or not. Is there a better way?