Arraylist is not persisted when running the application

cnordvik

Newcomer
Joined
May 2, 2003
Messages
5
I have a custom control with an arraylist containing Panels. The array is working great in design mode, but when I run the application then the list is set to null.

Is there any difference between an arraylist and a string or int when it comes to persisting the values?


My panel class
<cs>
[Serializable()]
public class MyTabbedPage : Panel

{
public VizTabbedPage()
{
//
// TODO: Add constructor logic here
//

}
</cs>

And my control:

<cs>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Category("Test"),Editor(typeof(VizTabbedPageEditor),typeof(UITypeEditor))]
public System.Collections.ArrayList TabPages
{
get
{
return tabPages;
}
set
{
tabPages = value;
if(tabPages != null)
{
updateTabPages();
}

}
}
</cs>
 
Thanks a lot! I'm from a Java background and not used to GUI programming. Been doing too much web programming so I really did not see any reason to not use Arraylist, but now I do!

-Christer
 
Back
Top