0

I want to add a control (Panel in this case) to a TableLayoutPanel in a specific row (column doesn't matter), but if this row is full of controls and I try to add another one on this row, the control is added in the next row.

Is there something I can do to know if the control that I want to add to any row is going to fit in the row that I want?

Actual behaviour that I'm experimenting

As you can see on the image, those 5 panels are appointments set to the same hour (15hs)

The program I'm developing is about appointments, so the Panel that I want to add to the TableLayoutPanel is an appointment, so I need to know if the control that I'm adding to the row is going to fit or not.

1 Answer 1

0

I finally figured out to resolve this issue in the backend side, directly asking if the initial time and the final time of the appointment was inside the range of another appointment. Because I can have a variable number of appointments at the same time, if the appointment is in the range of another one, i just increment an int value and checks if the amount of appointments overlapped are >= than the max amount allowed.

Hope it helps anyone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.