Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Custom Controls

Custom Controls

Scheduled Pinned Locked Moved C#
questioncsharpphpdesign
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Victor Boctor
    wrote on last edited by
    #1

    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[^]

    T L 2 Replies Last reply
    0
    • V Victor Boctor

      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[^]

      T Offline
      T Offline
      thomasa
      wrote on last edited by
      #2

      You probably have to save the values to a file

      V 1 Reply Last reply
      0
      • T thomasa

        You probably have to save the values to a file

        V Offline
        V Offline
        Victor Boctor
        wrote on last edited by
        #3

        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[^]

        T 1 Reply Last reply
        0
        • V Victor Boctor

          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[^]

          T Offline
          T Offline
          thomasa
          wrote on last edited by
          #4

          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:)

          1 Reply Last reply
          0
          • V Victor Boctor

            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[^]

            L Offline
            L Offline
            leppie
            wrote on last edited by
            #5

            Your properties mite need to apply the DesignerSerializationVisibilityAttibuteThatPerhapsIsMisspeltAttrribute :) leppie::AllocCPArticle("Zee blog");
            Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups