I have a usercontrol named groupControl: It has two flowlayoutpanel – source panel and destination panel. It also has a button.
I have another usercontrol named item. I will dynamically lay N item controls in source panel and M item controls in target panel.
I want there are straight lines between each item control and button on groupControl.
Finally I have a test form MainForm, it also contains a flowlayoutpanel. I will dynamically lay X groupcontrols on MainForm.
How could I draw straight lines between each usercontrol item and the button on the same groupControl?
The Visual Basic Power Pack contains a DataRepeater, and some shapes (oval, rectangle..) including a line. See this link.
It is called “Visual Basic” Power Pack, but it can be used in a C# project without any hassle.
Look at the DataRepeater, not only it will help you to fill your panel with custom controls as items, but it contains what you need to put a line between them.