I have a dialog style application that uses DirectX to play DVD movies.

In the center of the form is the main panel where DirectX displays the
movie. Around the edges are various list controls, checkboxes and buttons.

When the window is resized, I only want the main panel to resize and
everything else to stay as stationary as possible. In the case of vertical
resizing (expansion), I would like the controls on each side of the main
panel to expand proportionately. However, I want the buttons on the bottom
to stay the same giving all the new room to the main panel.

I could override the OnResize and write the logic to reposition all the
controls. Uggghhh... Does .NET 2005 have anything like a java gridbaglayout
manager? I know .NET 2003 could resize a dialog box and allowed you to
specify how it would resize. But this did not give me enough control and I
experienced very ugly results. Is 2005 more sophisticated in this way?

Thanks,
Siegfried

Re: How to elegantly handle resizing dialog box in 2005? by Dave

Dave
Thu Aug 17 23:17:55 CDT 2006

Hi Siegried,

Try the TableLayoutPanel.

If you only want the side panels to expand vertically, then you can create 3 columns and 3 rows. Set the outer columns to an
absolute size and set the middle column to 100%. The top two rows should be 50% each and the bottom row should be set to an
absolute size.

HTH

--
Dave Sexton

"Siegfried Heintze" <siegfried@heintze.com> wrote in message news:OHHX26kwGHA.4200@TK2MSFTNGP04.phx.gbl...
>I have a dialog style application that uses DirectX to play DVD movies.
>
> In the center of the form is the main panel where DirectX displays the movie. Around the edges are various list controls,
> checkboxes and buttons.
>
> When the window is resized, I only want the main panel to resize and everything else to stay as stationary as possible. In the
> case of vertical resizing (expansion), I would like the controls on each side of the main panel to expand proportionately.
> However, I want the buttons on the bottom to stay the same giving all the new room to the main panel.
>
> I could override the OnResize and write the logic to reposition all the controls. Uggghhh... Does .NET 2005 have anything like a
> java gridbaglayout manager? I know .NET 2003 could resize a dialog box and allowed you to specify how it would resize. But this
> did not give me enough control and I experienced very ugly results. Is 2005 more sophisticated in this way?
>
> Thanks,
> Siegfried
>



Re: How to elegantly handle resizing dialog box in 2005? by Dave

Dave
Thu Aug 17 23:23:51 CDT 2006

Update:
The top two rows do not have to be 50% each.

As a matter of fact, you'll probably find that having the top row set to an absolute size and setting the middle row to 100% is what
your after.

--
Dave Sexton

"Dave Sexton" <dave@jwa[remove.this]online.com> wrote in message news:OPVNK1nwGHA.2204@TK2MSFTNGP03.phx.gbl...
> Hi Siegried,
>
> Try the TableLayoutPanel.
>
> If you only want the side panels to expand vertically, then you can create 3 columns and 3 rows. Set the outer columns to an
> absolute size and set the middle column to 100%. The top two rows should be 50% each and the bottom row should be set to an
> absolute size.
>
> HTH
>
> --
> Dave Sexton
>
> "Siegfried Heintze" <siegfried@heintze.com> wrote in message news:OHHX26kwGHA.4200@TK2MSFTNGP04.phx.gbl...
>>I have a dialog style application that uses DirectX to play DVD movies.
>>
>> In the center of the form is the main panel where DirectX displays the movie. Around the edges are various list controls,
>> checkboxes and buttons.
>>
>> When the window is resized, I only want the main panel to resize and everything else to stay as stationary as possible. In the
>> case of vertical resizing (expansion), I would like the controls on each side of the main panel to expand proportionately.
>> However, I want the buttons on the bottom to stay the same giving all the new room to the main panel.
>>
>> I could override the OnResize and write the logic to reposition all the controls. Uggghhh... Does .NET 2005 have anything like a
>> java gridbaglayout manager? I know .NET 2003 could resize a dialog box and allowed you to specify how it would resize. But this
>> did not give me enough control and I experienced very ugly results. Is 2005 more sophisticated in this way?
>>
>> Thanks,
>> Siegfried
>>
>
>