Custom Controls
-
Hi, I am implementing a custom control which has a listview as one of its sub controls. I am able to populate this list at design time through the control properties. The populated list then appears as expected in design time. Once I run the application, the list appears empty. Terminating the application and re-opening the form (in design time), shows the list as empty! How can I retain the values of the properties provided by the user at design/runtime!??!! Thanks in advance, Victor phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]
-
Hi, I am implementing a custom control which has a listview as one of its sub controls. I am able to populate this list at design time through the control properties. The populated list then appears as expected in design time. Once I run the application, the list appears empty. Terminating the application and re-opening the form (in design time), shows the list as empty! How can I retain the values of the properties provided by the user at design/runtime!??!! Thanks in advance, Victor phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]
-
thomasa wrote: You probably have to save the values to a file There must be another way of doing it. For example, if you have a form with two edit boxes, the first is set to TextBox1 and the second is set to TextBox2. I am sure these design time values will not be saved to files, however, they will be part of the form or something. Regards, Victor. phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]
-
thomasa wrote: You probably have to save the values to a file There must be another way of doing it. For example, if you have a form with two edit boxes, the first is set to TextBox1 and the second is set to TextBox2. I am sure these design time values will not be saved to files, however, they will be part of the form or something. Regards, Victor. phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]
I'm not shore what you meen, but if you still have your Main application open, and it is a sub application you close and reopen, then you can tranfere the values from your sub application to your Main application, and vica versa. A preferd item to store the values is an ArrayList or something like that. On cration of your sub application you could write something like (in Main) MyListViewLib.MyListView myListView = new MyListViewLib.MyListView(myArrayList) (in Sub(a constructor)) MyListView(ArrayList anArrayList) { for(int i = 0; i < anArrayList.Count; i++) { theNewListView.Add(anArrayList[i]) } or something like this... If you close all your applications then you have to save it to a file. Hope it helps:)
-
Hi, I am implementing a custom control which has a listview as one of its sub controls. I am able to populate this list at design time through the control properties. The populated list then appears as expected in design time. Once I run the application, the list appears empty. Terminating the application and re-opening the form (in design time), shows the list as empty! How can I retain the values of the properties provided by the user at design/runtime!??!! Thanks in advance, Victor phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]