Control Added

  • Thread starter Thread starter Marco
  • Start date Start date
M

Marco

Using the Layout event of a control and the
AffectedControl property, how do I know if a control was
added to or subtracted from the main one ?
Thanx.

_____
Marco
 
You almost said it.
Use the ControlAdded and ControlRemoved events of the parent control or
form.
The event arguments will give you the control that was added/removed.

I don't know if you can use the LayoutEvent for this. Maybe you can check
the Parent property of the AffectedControl, if it is the parent control then
it has been added, if null then it has been removed (maybe).
 
Back
Top