Jump to content

Creating Multiple SETS of radio buttons


Recommended Posts

I am trying to make two sets of radio buttons for a simple GUI. I have the four radio buttons made but only one of them can be active at a time. How do i change it so that there are two independant sets, each of which can have 1 button activated. i.e. one switch can be on/off. the other can be yes/no. Thanx in advance.

Link to comment
Share on other sites

something like this

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$Group1 = GUICtrlCreateGroup("Group1", 24, 24, 129, 217)
$Radio1 = GUICtrlCreateRadio("Radio1", 40, 48, 97, 25)
$Radio2 = GUICtrlCreateRadio("Radio2", 40, 80, 97, 33)
$Radio3 = GUICtrlCreateRadio("Radio3", 40, 112, 105, 33)
$Radio4 = GUICtrlCreateRadio("Radio4", 40, 152, 105, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Group2", 160, 32, 145, 97)
$Radio5 = GUICtrlCreateRadio("Radio5", 168, 48, 113, 25)
$Radio6 = GUICtrlCreateRadio("Radio6", 168, 80, 105, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Link to comment
Share on other sites

Thanks for your reply. Just got home from work and will be trying this in the morning because I'm heading to sleep now.

EDIT: This worked perfectly and is exactly what i needed to do. Thanks a lot.

Edited by TTAJohn08
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...