Jump to content

Recommended Posts

Posted

Something like this ?

#include <GUIConstants.au3>

GUICreate("", 300, 180)
GUICtrlCreateLabel("Describe Helge...", 10, 10, 280, 20, $SS_CENTER)
$check1 = GUICtrlCreateCheckbox("Cool", 10, 35, 280, 20, $BS_PUSHLIKE)
$check2 = GUICtrlCreateCheckbox("Retarded", 10, 60, 280, 20, $BS_PUSHLIKE)
$check3 = GUICtrlCreateCheckbox("Strange", 10, 85, 280, 20, $BS_PUSHLIKE)
$check4 = GUICtrlCreateCheckbox("Genius", 10, 110, 280, 20, $BS_PUSHLIKE)
$checkall = GUICtrlCreateCheckbox("All", 10, 150, 280, 20, $BS_PUSHLIKE)
GUISetState()

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then Exit

    If $msg = $checkall Then
        If BitAND(GUICtrlRead($checkall), $GUI_CHECKED) Then
            For $i =  $check1 To $check4
                GUICtrlSetState($i, $GUI_CHECKED)
            Next
        Else
            For $i =  $check1 To $check4
                GUICtrlSetState($i, $GUI_UNCHECKED)
            Next
        EndIf
    EndIf
WEnd

Posted (edited)

Question 2:

Say I have a subgroup of checkboxes. If I check the "select all" box, I want ALL the boxes to be checked, but when i check the "select subgroup" box, I only want those boxes in the subgroup checked. Any way to do this?

Edit: nvm i got it

Edited by probedrone

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
×
×
  • Create New...