Results 1 to 3 of 3

Thread: [RESOLVED] Guidance on saving controls

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Location
    USA
    Posts
    150

    Resolved [RESOLVED] Guidance on saving controls

    It has been some time since I have posted here but I always seem to come back to this great resource when I need help.

    I have a small windows form program that lets the user create controls (buttons) on a panel. I would like save these but the control collection of the panel is not serializable, so it is not immediately obvious how I would go about doing this.

    My next thought was to create a datatable and storing the controls parameters, ie location, size, text etc then serializing this to disk.
    I would then recreate the buttons next time the application is run.

    I am open to any better suggestions on how best to do this.
    Not looking for code, just and idea or two.

    Thanks
    Think.... Question.....

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,350

    Re: Guidance on saving controls

    Quote Originally Posted by 2ndmessiah View Post
    My next thought was to create a datatable and storing the controls parameters, ie location, size, text etc then serializing this to disk.
    I would then recreate the buttons next time the application is run.
    That's basically it. It doesn't have to be a DataTable and it doesn't have to be serialisation specifically but you would basically save the parameters that describe the controls to some external file and reload at startup.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Location
    USA
    Posts
    150

    Re: Guidance on saving controls

    That is great thanks.
    Think.... Question.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width