Jump to content

Combo box & radio button


Recommended Posts

first of all ur topic should be in the GUI help and support

I would recommend u to use the help file

I hope this example will be helpfull 4 u

#include <GUIConstants.au3>

GUICreate("TEST", 250, 150)
$rad_1 = GUICtrlCreateRadio ("item 1" ,20,20,200)
$rad_2 = GUICtrlCreateRadio ("item 2" ,20,40,200)
$rad_3 = GUICtrlCreateRadio ("item 3" ,20,60,200)
$comb = GUICtrlCreateCombo ("" ,20, 100 , 200 , 30)
GUICtrlSetData(-1,"item1|item2|item3")
$staslable = GUICtrlCreateLabel ("", 20 ,130,230,25)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    Select
        Case $msg = $rad_1
        GUICtrlSetData ($comb , "item1")
        GUICtrlSetData ($staslable , "u have selected Radio 1")
        MsgBox (-1,"info", "Radio 1 checked")
        Case $msg = $rad_2
        GUICtrlSetData ($comb , "item2")
        GUICtrlSetData ($staslable , "u have selected Radio 2")
        MsgBox (-1,"info", "Radio 2 checked")
        Case $msg = $rad_3
        GUICtrlSetData ($comb , "item3")
        GUICtrlSetData ($staslable , "u have selected Radio 3")
        MsgBox (-1,"info", "Radio 3 checked")
EndSelect
WEnd

see ya :)

Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

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