none
TableLayout panle and Docking mode = fill with all columns set to equal size RRS feed

  • Question

  • Please, look at this pic.

    What I want is just to get a UserCtrl resizable.

    A tableLayout panel inside with one row only and 6 columns, 16.666% width each
    6 automatically resizable PictureBoxes inside each cell set to Docking mode = Fill

    As a result - I resize UserCtrl and all elements are scaled automatically to its new size.

    Maybe it's too late already, but I don't really understand what's going on?

    It doesn't want to resize all elements, though they're all set to AutoSize and GrowAndShrink.
    And PictureBoxes are also Docked as Fill.
    Pls, tell be what is wrong with that schema? Really weird..

    Thursday, July 4, 2019 12:38 AM

Answers

  • Greetings Robb.

    I was able to repeat your problem, but I don't know how.

    It all seemed to work at first, so I tried adding and removing columns and rows, and changing properties, then suddenly the TableLayoutPanel started to behave like yours. No matter what I did, now only the last column would resize. Eventually I shut the solution down and re-opened it, and the problem went away.

    So I tried to retrace my steps, trying to make it stop working again, to no avail. Whatever went wrong, I couldn't reproduce it.

    Therefore my suggestion is; Try closing the solution and re-opening it.

    Sorry I couldn't come up with a better answer.

    • Marked as answer by RobbKirk Friday, July 5, 2019 6:36 AM
    Thursday, July 4, 2019 4:08 AM

All replies

  • Hi RobbKrik,

    Thank you for posting here.

    Based on your description, I followed the steps as you mentioned. I still could not reproduce your problem, you could look at the following picture.

    Picture:

    You could upload the project that exists problems to Onedrive and give me the download link if you want to solve the problem better.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 4, 2019 2:38 AM
    Moderator
  • Greetings Robb.

    I was able to repeat your problem, but I don't know how.

    It all seemed to work at first, so I tried adding and removing columns and rows, and changing properties, then suddenly the TableLayoutPanel started to behave like yours. No matter what I did, now only the last column would resize. Eventually I shut the solution down and re-opened it, and the problem went away.

    So I tried to retrace my steps, trying to make it stop working again, to no avail. Whatever went wrong, I couldn't reproduce it.

    Therefore my suggestion is; Try closing the solution and re-opening it.

    Sorry I couldn't come up with a better answer.

    • Marked as answer by RobbKirk Friday, July 5, 2019 6:36 AM
    Thursday, July 4, 2019 4:08 AM