A Windows Forms project that works only in a designer (i.e. with a mouse, before compilation). I have a form and 2 panels. Panel 1 is fixed (option - fill) in form1. panel2 is also docked (filled) in form1. In addition, panel2 is located in front of panel 1 (the latter is hidden behind the first). My problem is that when I unlock panel2 and again its dock, it joins panel 1 (panel1 becomes its parent), and not in form1. How to change the parent element of panel2?
The only solution I've figured out so far is to cut out (ctrl + x) panel2, select form1, and then paste (ctrl + v) panel2, but this for some reason removes all connections between the panel2 controls and the code ( for example, pressing a button on panel2 no longer works, although the event handling function still exists).
Any better ideas?
source
share