1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

noob - Saving all data in delphi

Discussion in 'Software Development' started by comet, Mar 19, 2005.

Thread Status:
Not open for further replies.
  1. comet

    comet Thread Starter

    Joined:
    Jun 13, 2004
    Messages:
    33
    i have 2 groupbox's in form1, and in both i have like 5 checkbox's.i also have a button called btnSave and another called btnLoad. my question is, how can i make it so when i click btnSave, the staus of all the checkbox's (whether they are checked or not) is saved to a file. and when i press btnLoad, they are loaded.
    hope i made myself clear. :eek:
    i really need an answer for this urgently. :(
    thanks in advance. :)
     
  2. dttri

    dttri

    Joined:
    Mar 5, 2005
    Messages:
    163
    Do you know how to process files in Delphi? If the answer is yes, please follow:
    */Read the state of the check boxes and their names
    */Write these values in a file (eg, state.txt), with a consistent format (eg, name1:checked, name2:nochecked ...) name1, name2 is the name of the check boxes, and checked, nochecked is their values. Of course, you could format it with your own.
    */Close the file
    */When you need to load the states, just open the file (state.txt) and read the string in it and check the values of the approriate check boxes.

    Hope this help

    PS: If you don't know how to process files in Delphi, google it :)
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/343104

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice