Control Added

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marco

    #1

    Control Added

    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

  • TJoker .NET [MVP]

    #2
    Re: Control Added

    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).

    --
    TJoker, MCSD.NET
    MVP: Paint, Notepad, Solitaire

    *************** *************** **********


    "Marco" <a@b.c> wrote in message
    news:031401c381 f9$32851c50$a40 1280a@phx.gbl.. .[color=blue]
    > 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
    >[/color]


    Comment

    Working...