Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Fluid Layout By Custom Polygon Shapes

Fluid Layout By Custom Polygon Shapes

Scheduled Pinned Locked Moved C#
csharpwinformsquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Som Shekhar
    wrote on last edited by
    #1

    Like we have FlowLayoutPanel, where controls can automatically get laid out according to their sizes and sequence, I have a requirement of a fluid layout. In a rectangle or area (say 500w X 100h), there are some fixed small controls. lets say a rectangle control of (100w X 30h) is fixed at point (0 top , 150 left) Now, I need to fill this bigger rectangle with small shaped controls with constant areas but variable widths. Height can be maximum wherever possible. The controls not adjacent to fixed control will be rectangles So, no problems. The controls adjacent to fixed controls will need to take polygon shape of variable heights to fit in the balance space. Any logic already existing? Any approaches? And yes, this is for winforms.

    S 1 Reply Last reply
    0
    • S Som Shekhar

      Like we have FlowLayoutPanel, where controls can automatically get laid out according to their sizes and sequence, I have a requirement of a fluid layout. In a rectangle or area (say 500w X 100h), there are some fixed small controls. lets say a rectangle control of (100w X 30h) is fixed at point (0 top , 150 left) Now, I need to fill this bigger rectangle with small shaped controls with constant areas but variable widths. Height can be maximum wherever possible. The controls not adjacent to fixed control will be rectangles So, no problems. The controls adjacent to fixed controls will need to take polygon shape of variable heights to fit in the balance space. Any logic already existing? Any approaches? And yes, this is for winforms.

      S Offline
      S Offline
      Saksida Bojan
      wrote on last edited by
      #2

      Som Shekhar wrote:

      Any logic already existing?

      AFAIK it doesn't exsist. Maybe 3rd party control would have it.

      Som Shekhar wrote:

      Any approaches?

      I Would use OnResize event and programaticly calculate the behaver

      S 1 Reply Last reply
      0
      • S Saksida Bojan

        Som Shekhar wrote:

        Any logic already existing?

        AFAIK it doesn't exsist. Maybe 3rd party control would have it.

        Som Shekhar wrote:

        Any approaches?

        I Would use OnResize event and programaticly calculate the behaver

        S Offline
        S Offline
        Som Shekhar
        wrote on last edited by
        #3

        Saksida Bojan wrote:

        AFAIK

        Yes, "AFAIK" applies to me too. I just hoped that others may have some experience or thoughts.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups