Understanding control Struture

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jw56578@gmail.com

    #1

    Understanding control Struture

    Im wondering why this occurs. If I have a control and i add it to a
    table cell.
    cell.controls.a dd(customobject )
    and then i add it to another cell
    cell2.controls. add(customobjec t)

    why does my customobject get removed from the first cell

  • Herfried K. Wagner [MVP]

    #2
    Re: Understanding control Struture

    <jw56578@gmail. com> schrieb:[color=blue]
    > Im wondering why this occurs. If I have a control and i add it to a
    > table cell.
    > cell.controls.a dd(customobject )
    > and then i add it to another cell
    > cell2.controls. add(customobjec t)
    >
    > why does my customobject get removed from the first cell[/color]

    It will be removed because one control can only be at one location at a
    certain time.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • c j anderson, mcp

      #3
      Re: Understanding control Struture

      The workaround is to inherit your class from the type of control that
      you wish to create and to implement the ICloneable interface (you will
      probably need a "deep" copy of the object at some point)

      Cheers.
      ---

      nemo me impune lacessit

      *** Sent via Developersdex http://www.developersdex.com ***

      Comment

      Working...