important quey

  • Thread starter Thread starter bushi
  • Start date Start date
B

bushi

hi every one!
i have designed the interface of an application using a
form.there are some controls added to the form.when i maximize the
form,the controls remain of the same size as before,i want they should
maximize too.any one have idea about it plz rply,i'm waiting for any
solution anxiouly.......
 
bushi said:
hi every one!
i have designed the interface of an application using a
form.there are some controls added to the form.when i maximize the
form,the controls remain of the same size as before,i want they should
maximize too.any one have idea about it plz rply,i'm waiting for any
solution anxiouly.......

There are several ways to do this, depending on the type of controls on
the form and how you want them to re-size. For something like a
TreeView, I'd put it inside a panel then set the Dock property to Fill.
However, for something like a TextBox you can create a handler for the
Form.Resize event then set the size of the control there:

private void Form1_Resize(object sender, EventArgs e)
{
textBox1.Width = this.Width - 32;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top