I have the following screen:
What I would like to happen is the following:
How will it be possible to have the first RichTextBox
and the 3rd RichTextBox
expand the FlowLayoutPanel
when the 2nd "hidden" RichTextBox
is set to RichTextbox2.Visible = false
.
The idea is to have any of the controls, that are visible inside the FlowLayoutPanel
to fill up the space when loading data from the database that is not getting used inside the FlowLayoutPanel
as image 2 suggests. So if there is another RichTextBox
that all 3 will then occupy all available space inside the FlowLayoutPanel
.
I have tried the following suggestions here, but I can't get the expanding unused space right.
Should be fairly simple math... (not going for any efficiency here)
If the number of richtextboxes is indeed variable - you may want to put a limit so you don't wind up with 600 1-pixel high text boxes...