Mast3rpyr0 Posted August 20, 2007 Share Posted August 20, 2007 Ok i got a checkbox and depending on a key in an INI file it should start off checked. Ive tried If $doCompress = "True" Then $doCompressConfig = GUICtrlCreateCheckbox("Compress Backups", 75, 90, -1, -1, -1, $GUI_CHECKED) <--Done this in both style positions. Else $doCompressConfig = GUICtrlCreateCheckbox("Compress Backups", 75, 90); EndIf and If $doCompress = "True" Then $doCompressConfig = GUICtrlCreateCheckbox("Compress Backups", 75, 90); GUICtrlSetData($doCompressConfig, $GUI_CHECKED) Else $doCompressConfig = GUICtrlCreateCheckbox("Compress Backups", 75, 90); EndIf Did i miss something? My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
SteveO Posted August 20, 2007 Share Posted August 20, 2007 (edited) Try this.... If $doCompress = "True" Then GUICtrlSetState($doCompressConfig , $GUI_CHECKED) Else GUICtrlSetState($doCompressConfig , $GUI_UNCHECKED) EndIf Just make sure the checkbox is created before hand, that way this will just change it's status. It looks light you had it right in the second one. Just instead of "GUICtrlSetData" use "GUICtrlSetState" =) Edited August 20, 2007 by SteveO Link to comment Share on other sites More sharing options...
Gif Posted August 20, 2007 Share Posted August 20, 2007 (edited) something likeIf $doCompress == "True" Then $doCompressConfig = GUICtrlCreateCheckbox("Compress Backups", 75, 90); GUICtrlSetState(-1, $GUI_CHECKED) Else $doCompressConfig = GUICtrlCreateCheckbox("Compress Backups", 75, 90); GUICtrlSetState(-1, $GUI_UNCHECKED) EndIf Edited August 20, 2007 by Gif Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 20, 2007 Author Share Posted August 20, 2007 ah ha thanks guys. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now