Re: Keeping controls centered

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Bruce Wood wrote:

On Feb 4, 2:07 am, "Frans Bouma [C# MVP]"
<perseus.usenetNOS...@xxxxxxxxx> wrote:
Chris Saunders wrote:
This is not actually a C# question but I'm not sure which
newsgroup is appropriate for this question. My apologies if I'm
being "off-topic".

I'm writing and application that has a group box that contains a
bunch of radio buttons and wish to keep this group box and its
buttons centered when the width of the window is changed. I do
know how to accomplish this using code but I wonder if there is a
simpler method? I'm using Visual Studio 2005 to write this
application.

Simply anchor it only to the bottom of the form while
pre-centering it in the designer. Then when you resize the window,
the groupbox will stay centered.

Really! I had no idea!

Does that work in 1.1 as well as 2.0? Or is it a WPF thing?

It works since .NET 1.0 :)

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
.



Relevant Pages

  • Re: Keeping controls centered
    ... bunch of radio buttons and wish to keep this group box and its ... buttons centered when the width of the window is changed. ... Lead developer of LLBLGen Pro, the productive O/R mapper for .NET ... My .NET blog: http://weblogs.asp.net/fbouma ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Keeping controls centered
    ... bunch of radio buttons and wish to keep this group box and its ... buttons centered when the width of the window is changed. ... Or is it a WPF thing? ... Lead developer of LLBLGen Pro, the productive O/R mapper for .NET ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Keeping controls centered
    ... My apologies if I'm being ... bunch of radio buttons and wish to keep this group box and its ... buttons centered when the width of the window is changed. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Keeping controls centered
    ... My apologies if I'm being ... bunch of radio buttons and wish to keep this group box and its ... buttons centered when the width of the window is changed. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Keeping controls centered
    ... bunch of radio buttons and wish to keep this group box and its ... buttons centered when the width of the window is changed. ... Or is it a WPF thing? ...
    (microsoft.public.dotnet.languages.csharp)