Jump to content

On Check Radio Button Do Something


Recommended Posts

I want to make a group of radio buttons. If i check one i want to set some information to an inputbox. But how do i make something like "on check"? I did it at the and of the gui but on every mouse move the gui reloads and that is not ok.

Link to comment
Share on other sites

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Radio_1 = GuiCtrlCreateRadio("Radio1", 30, 40, 160, 40)
$Radio_2 = GuiCtrlCreateRadio("Radio2", 30, 100, 160, 40)
$Radio_3 = GuiCtrlCreateRadio("Radio3", 30, 170, 160, 40)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Radio_1
        MsgBox (0,"Checked", "Radio button 1")
    Case $msg = $Radio_2
        MsgBox (0,"Checked", "Radio button 2")
    Case $msg = $Radio_3
        MsgBox (0,"Checked", "Radio button 3")
    Case Else
        ;;;
    EndSelect
WEnd
Exit

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...