Jump to content

How do I store whether or not a box is checked in my GUI?


Recommended Posts

I made a gui for my program that saves values to an ini file. I was wondering though, how can I make it so that the next time the user starts the program and brings up the gui, the correct values are checked? What kind of variable would I use and how would I go about doing it?

Link to comment
Share on other sites

Save the value with GUICtrlRead($checkbox).

Use this when you create your GUI (startup).

$checkbox = GUICtrlCreateCheckbox("My checkbox", 40, 200, 250, 20)

GUICtrlSetState(-1, IniRead("file.ini", "Check", "Checkbox1", 4))

A checkbox can have two values, 1 or 4 depending on if it's selected or not.

1 = checked

4 = unchecked

Edited by Pain
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...