Rearrange the Usercontrol position in panel

PARTH DESAI 61 Reputation points
2021-04-24T21:33:26.043+00:00

Hello,

I have a Usercontrol with a panel and textboxes in it. I can change the height of a panel from button present in usercontrol.
This created usercontrol is then used in a from application inside a form panel multiple times one below the other.
When I run my form application and click on button present over user control It changes its own usercontrol height
but it keeps the gap and space as it is in form panel.
I want to rearrange and make it behave similar to expand and collapse.

Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 122.6K Reputation points
    2021-04-25T07:18:46.217+00:00

    Maybe place your user controls inside a FlowLayoutPanel, having FlowDirection: TopDown, WrapContents: False, AutoScroll: True. Then the user controls will be automatically arranged.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.