Results 1 to 8 of 8

Thread: [RESOLVED] [3.0/linq]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    Resolved [RESOLVED] [3.0/linq]

    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.
    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;
    Which works fine, I am wondering if there was a better way to write this code?

    The text box is anchored top left and the command button is anchored top right.

    Thanks Steve
    Attached Images Attached Images  
    This space for rent...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width