dynamically resizing forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nikhil Patel

    #1

    dynamically resizing forms

    Hi all,
    I dynamically create new controls and display them on the form. My
    problem is that the user has to resize form manually to see controls whose
    location property points to a point outside the form's area. So can you
    please show me a way to resize the form after adding a dynamic control so
    whose Location points to a point outside the form's boundary. So that the
    control can be displayed without resizing the form manually?

    Thanks...


  • David Faircastle

    #2
    Re: dynamically resizing forms

    Hi Nikhil,

    Just as your Controls have a Size property, so does a Form. Simply
    calculate the new width and height and set the Size.

    Another approach is to set the AutoScroll property of the Form to
    True. Then, when a Control appears which is outside the bounds of the
    window, scroll bars will appear.

    Regards,
    Fergus


    Comment

    Working...