PC Review


Reply
Thread Tools Rate Thread

Do I have to serialize?

 
 
Stefan De Schepper
Guest
Posts: n/a
 
      1st Aug 2003
Hi all,

I'm trying to write my own FlatComboBox control. One of its properties is an
Items collection. An Item consists of a text, key and imageindex property.
When adding items to a FlatComboBox (during design time) and filling in
text, key and imageindex properties all seems to work, but when I start the
application, the Items are all gone.
My guess is that I need to make the Item class serializable (so it can be
saved), which I did, but when I go to the form designer window, the form
won't show up anymore. I get the build error: "At least one element in the
source array could not be cast down to the destination array type."
The only thing added in the form's code is:

Me.FlatComboBox1.Items.AddRange(New FlatComboBox.Item()
{CType(resources.GetObject("FlatComboBox1.Items.Items"), FlatComboBox.Item),
CType(resources.GetObject("FlatComboBox1.Items.Items1"), FlatComboBox.Item),
CType(resources.GetObject("FlatComboBox1.Items.Items2"),
FlatComboBox.Item)})

I do not see the text, key or imageindex properties in the new items. Btw, I
don't have the problem when I make the Item class inherit the Component
class, but then all items I add to the FlatComboBox show up in the form's
designer window.
What is happening here and what's the solution to it? Thanks in advance.

Stefan.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
serialize to iso ? Steph Microsoft C# .NET 2 3rd Jul 2008 03:14 PM
Serialize to Xml. Sugandh Jain Microsoft C# .NET 7 28th Dec 2006 01:23 PM
what does serialize mean Rachel Suddeth Microsoft Dot NET 2 21st Jan 2005 07:16 PM
serialize to SQL Server Blob instead of XML serialize Gordz Microsoft ASP .NET 3 7th Jun 2004 08:46 PM
<Serialize> what does it really mean??? serge calderara Microsoft Dot NET 2 25th Sep 2003 07:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:01 PM.