Hi All,
When my form re-sizes I would like a text box that I have to grow up to the size of the group box that it is in but leave some room for a command button to the right of the text box. Currently I am using the following code.Which works fine, I am wondering if there was a better way to write this code?Code:this.txtFilePath.Width = this.groupBox.Width - this.groupBox.Padding.Left - this.groupBox.Padding.Right - this.txtFilePath.Margin.Left - this.txtFilePath.Margin.Right - this.cmdBrowse.Margin.Left - this.cmdBrowse.Width - this.cmdBrowse.Margin.Right;
The text box is anchored top left and the command button is anchored top right.
Thanks Steve




Reply With Quote