Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / May 2005

Tip: Looking for answers? Try searching our database.

Add to a collection at design time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
talfano@ncpsolutions.com - 12 May 2005 07:09 GMT
Hello,

I would like to add a new item to a collection at Design Time without
going through a collection editor.  I am trying to add an item to a
collection from from DesignerVerb handler.

I have DesigntimeSerializationVisibility set to "Content" on the
Collection property, but I am a little confused about how to "create"
the new object to add.  For instance, to add it to the collection, at
some point I would call:

m_oCollection.Add(myNewItem);

But I don't quite understand how to obtain myNewItem.  It seems like it
must have to be given a Site some how and a Site.Name...  I am not
quite sure how to do this.  Please tell me that I am not going to have
to Serialize the code manually... :)

TIA
joeycalisay - 12 May 2005 09:18 GMT
if your collection is a collection of components (designable), the said item
should be created through the designer host, i.e.:
IDesignerHost.CreateComponent method

Signature

Joey Calisay
http://spaces.msn.com/members/joeycalisay/

> Hello,
>
[quoted text clipped - 15 lines]
>
> TIA

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.