monitorlg Posted March 11, 2009 Share Posted March 11, 2009 Hi All, I am making a GUI where, when i click a button named "Select all" , all my radio buttons should get enabled, I have tried using: GUISetState($r1 , $GUI_CHECKED), where $r1 is : $r1 = GUICtrlCreateRadio("Radio1", 1240, 120, 17, 17), the handle when creating radio button. Still i am not able to acheive the enabling of radio button... is there any other function or way to do it... Please help me. Link to comment Share on other sites More sharing options...
BrettF Posted March 11, 2009 Share Posted March 11, 2009 Radio button means 1 at a time to me. I think you want a checkbox? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
monitorlg Posted March 11, 2009 Author Share Posted March 11, 2009 Radio button means 1 at a time to me. I think you want a checkbox?How to enable all the check boxes...do u have any idea... Link to comment Share on other sites More sharing options...
BrettF Posted March 11, 2009 Share Posted March 11, 2009 Yes... it is in the helpfile... #include <GUIConstantsEx.au3> Global $total = 10 Global $ahCheckboxs[10] Global $state = 4 $hGUI = GUICreate("title", 200, 290) For $i = 0 To $total - 1 $ahCheckboxs[$i] = GUICtrlCreateCheckbox("Checkbox #" & $i + 1, 10, $i * 25, 150, 30) Next $hButton = GUICtrlCreateButton("Check All", 25, $i * 25 + 5, 150) GUISetState() While 1 For $i = 0 To $total - 1 $nMsg = GUIGetMsg() Switch $nMsg Case - 3 Exit Case $hButton If $state = $GUI_UNCHECKED Then $state = $GUI_CHECKED Else $state = $GUI_UNCHECKED EndIf For $a = 0 To $total - 1 GUICtrlSetState($ahCheckboxs[$a], $state) Next EndSwitch Next WEnd Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now