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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Resizing Panel in SplitContainer

Resizing Panel in SplitContainer

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 3 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.
  • E Offline
    E Offline
    e_LA
    wrote on last edited by
    #1

    Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela

    J L E 3 Replies Last reply
    0
    • E e_LA

      Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Have you looked at the Anchor property of the controls? This allows controls to be resized automatically.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Goof around music jam with my brothers (with video) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      1 Reply Last reply
      0
      • E e_LA

        Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela

        L Offline
        L Offline
        LongRange Shooter
        wrote on last edited by
        #3

        You could try to do an Anchor left, top, right. However all controls in your panel must be in a single collumn for this to work correctly. What you may have to do if Anchoring does not help is to subscribe to the Resize event on the panel. Then based on the size of Panel1 or Panel2 (whichever side your controls are in) you set the new sizes of your controls. I found one or two situations where Anchoring just did not do it for all of my controls.

        1 Reply Last reply
        0
        • E e_LA

          Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela

          E Offline
          E Offline
          e_LA
          wrote on last edited by
          #4

          Thanks for the answers. Anchoring is not a good solution. Controls are not resized. I have to do what I was affraid of. I will have to count the size of cotrols depends on size of panel. Thanks Ela

          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