Jump to content
Sign in to follow this  

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.

Share this post

Link to post
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)

While 1
    $msg = GuiGetMsg()
    Case $msg = $GUI_EVENT_CLOSE
    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

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...