I'm trying to work around the problem, of not being able to reparent a control to its GrandParent in Design-mode.
I want to add control_A to control_B, while control_A is covered by its child; control_C.
So I set AllowDrop = False on control_C, so control_A drops through and parents to Control_B.
But I still have to know on witch child, contol_A would have dropped.
To get the position of Control_A, I call OnControlAdded of Control_B:
X and Y are always zero.
Though control_A is added somewhere else.
Is the "drop"location of a control saved in some variable and used later?
I want to add control_A to control_B, while control_A is covered by its child; control_C.
So I set AllowDrop = False on control_C, so control_A drops through and parents to Control_B.
But I still have to know on witch child, contol_A would have dropped.
To get the position of Control_A, I call OnControlAdded of Control_B:
Code:
Protected Overrides Sub OnControlAdded(e As ControlEventArgs)
MsgBox(e.Control.Location.X)
MsgBox(e.Control.Location.Y)
End Sub
Though control_A is added somewhere else.
Is the "drop"location of a control saved in some variable and used later?