Arranging windows

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

    #1

    Arranging windows

    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


  • mark.milley@binaryswitch.com

    #2
    Re: Arranging windows

    Hi Jerry -

    You might be better off looking at the TableLayoutPane l 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

    Comment

    • Jerry Spence1

      #3
      Re: Arranging windows


      <mark.milley@bi naryswitch.comw rote in message
      news:1183397123 .780126.113360@ n60g2000hse.goo glegroups.com.. .
      Hi Jerry -
      >
      You might be better off looking at the TableLayoutPane l 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


      Comment

      Working...