By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,697 Members | 1,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,697 IT Pros & Developers. It's quick & easy.

Understanding control Struture

P: n/a
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

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<jw*****@gmail.com> schrieb:
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.

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

Nov 21 '05 #2

P: n/a
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.
---
http://code.box.sk
nemo me impune lacessit

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.