resize & keep Winform layout

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

    #1

    resize & keep Winform layout





    On VS 2003

    I have on a form textbox and 3 buttons , the buttons are aligned and keep
    the same line ,

    I want the Gui to keep the same ratio when resizing the form

    Say 90% textbox and 10% buttons



    Is there a way doing it without writing my own "OnResize" event , with just
    playing with the Doc & Anchor properties ?



    Thank you

    Sharon



  • D. Yates

    #2
    Re: resize & keep Winform layout

    Take a look at the Scale method. It Scales the control and any child
    controls to the specified ratio.


    Dave


    Comment

    • C.C. \(aka Me\)

      #3
      Re: resize & keep Winform layout

      You will probably have to manually code the resize event if you cannot get
      what you need by using Doc and Anchor. I think those are the only 2 real
      layout properties available.


      "Sharon" <Sharon669@hotm ail.com> wrote in message
      news:uAbl2UgHGH A.2036@TK2MSFTN GP14.phx.gbl...[color=blue]
      >
      >
      >
      >
      > On VS 2003
      >
      > I have on a form textbox and 3 buttons , the buttons are aligned and keep
      > the same line ,
      >
      > I want the Gui to keep the same ratio when resizing the form
      >
      > Say 90% textbox and 10% buttons
      >
      >
      >
      > Is there a way doing it without writing my own "OnResize" event , with
      > just playing with the Doc & Anchor properties ?
      >
      >
      >
      > Thank you
      >
      > Sharon
      >
      >
      >[/color]


      Comment

      • D. Yates

        #4
        Re: resize &amp; keep Winform layout

        Sorry, I read percetages and was thinking scaling. Achoring is probably do
        what you want if you have a simple layout.

        Dave


        Comment

        Working...