Bring the rectangle to the front
-
Hi, I have drawn three rectangles rect1, rect2, and rect3 respectively on a windows form. These rectangles are overlapping. Most of the portion of the rect1 is covered by rect2 and rect3. I want to bring the rect1 to the front. Is there any way please guide me I will be thankful to you. Don’t ask me to draw rect1 before rect2 and rect3. Any other solution that can bring the rectangle to the front, except change the drawing sequence. Regards,
-
Hi, I have drawn three rectangles rect1, rect2, and rect3 respectively on a windows form. These rectangles are overlapping. Most of the portion of the rect1 is covered by rect2 and rect3. I want to bring the rect1 to the front. Is there any way please guide me I will be thankful to you. Don’t ask me to draw rect1 before rect2 and rect3. Any other solution that can bring the rectangle to the front, except change the drawing sequence. Regards,
Not that I know of. I would suggest creating a z-order list and give each rectangle a z-order property then a simple reorder using your own sort method of your list before painting the rectangles will enable you to draw them in any order required without having to hard code it.
Dave