Understanding control Struture

  • Thread starter Thread starter jw56578
  • Start date Start date
J

jw56578

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

why does my customobject get removed from the first cell
 
Im wondering why this occurs. If I have a control and i add it to a
table cell.
cell.controls.add(customobject)
and then i add it to another cell
cell2.controls.add(customobject)

why does my customobject get removed from the first cell

It will be removed because one control can only be at one location at a
certain time.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top