Arranging windows

  • Thread starter Thread starter Jerry Spence1
  • Start date Start date
J

Jerry Spence1

I'm just wondering if there are any clever mathematicians out there.

My VB2005 program consists of a number of panels on a form. Here's the
rules:

The number of panels will be variable
The screen size is fixed
You can change the size of each panel, but it's aspect ratio must always be
1.3:1 (each panel hols a photo) and each panel should end up the same size.

I need an algarithm to determine the best way of arranging these panels on
my form. This is identical to the microsoft arrange panels in a tile format
if I was using an MDI form - which I am not.

Anyone any idea how to do it? This has been bugging me for ages.

Thanks

-Jerry
 
Hi Jerry -

You might be better off looking at the TableLayoutPanel Control.
Create a single row, and then add columns to it at run time, adding
inyour panels inside each cell with Dock set to Fill.

This will allow you to offload the "higher math" onto a proven
solution.

Good luck,

-Mark
 
Hi Jerry -

You might be better off looking at the TableLayoutPanel Control.
Create a single row, and then add columns to it at run time, adding
inyour panels inside each cell with Dock set to Fill.

This will allow you to offload the "higher math" onto a proven
solution.

Good luck,

-Mark

Thanks Mark. I hadn't spotted that control. Looks useful.

-Jerry
 
Back
Top