I have a button that dynamically adds up to 24 labels to the form. The problem is their location.
I figured out that instead of manually setting a specific location for each, I can have them automatically arranged like a FlowLayoutPanel does. But the FLP will be on top and hide controls under it. And sending it to back is worse. So i want to bring it to front but keep it transparent, so that it doesn't hide the other controls under it.
Any suggestions will be great
Thanks.
Well, you can use a
FlowLayoutPanel
with a transparent background so it doesn't hide the other controls you have. How to do that? Well, this answer shows you how to make a transparentPanel
. You should be able to easily adjust it to work with aFlowLayoutPanel
using something like this:Class
to your project.FlowLayoutPanel
).P.S. I'm not sure about the use of your 4 panels, but you might consider using a
TableLayoutPanel
instead.Hope that helps :)