slightly_abnormal Posted May 28, 2006 Share Posted May 28, 2006 Hi.. how do i get the groups to have a radio button $MAIN that is check and then the child radios can be checked only the main radio button stays check until I go to the other group, and the other main radio is check, ect. #include <GUIConstants.au3> $Form1 = GUICreate("Radios", 391, 294, 192, 125) $Group1 = GUICtrlCreateGroup("This", 8, 16, 377, 89) $Main1 = GUICtrlCreateRadio("One", 40, 48, 97, 17,$BS_AUTORADIOBUTTON) $main1_rad1= GUICtrlCreateRadio("These", 272, 56, 81, 17) $main1_rad2= GUICtrlCreateRadio("These", 272, 40, 81, 17) $main1_rad3= GUICtrlCreateRadio("These", 272, 72, 81, 17) $main1_rad4 = GUICtrlCreateCheckbox("Check", 176, 72, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("That", 8, 136, 377, 89) $Main2 = GUICtrlCreateRadio("One", 40, 176, 105, 17,$BS_AUTORADIOBUTTON) $main2_rad1 = GUICtrlCreateRadio("These", 264, 160, 81, 17) $main2_rad2= GUICtrlCreateRadio("These", 264, 176, 81, 17) $main2_rad3 = GUICtrlCreateRadio("These", 264, 192, 81, 17) $main2_rad4 = GUICtrlCreateCheckbox("Check", 176, 192, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Exit", 128, 248, 121, 33) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE or $msg = $Button1 ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted May 28, 2006 Moderators Share Posted May 28, 2006 Hi.. how do i get the groups to have a radio button $MAIN that is check and then the child radios can be checked only the main radio button stays check until I go to the other group, and the other main radio is check, ect.Maybe its just me, but I don't understand what you are tring to do. Link to comment Share on other sites More sharing options...
BigDod Posted May 28, 2006 Share Posted May 28, 2006 Maybe its just me, but I don't understand what you are tring to do.No its not just you Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 Just a shot in the dark... but do you mean that the other group is disabled (cannot be checked) until you check something on the first (Main) group? Link to comment Share on other sites More sharing options...
slightly_abnormal Posted May 28, 2006 Author Share Posted May 28, 2006 (edited) does the picture make sence?[eidt] yeah, thats what i mean... nomad.. Edited May 28, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
ChrisL Posted May 28, 2006 Share Posted May 28, 2006 Do you mean this? expandcollapse popup#include <GUIConstants.au3> $Form1 = GUICreate("Radios", 391, 294, 192, 125) $Group1 = GUICtrlCreateGroup("This", 8, 16, 377, 89) $Main1 = GUICtrlCreateRadio("One", 40, 48, 97, 17,$BS_AUTORADIOBUTTON) $Main2 = GUICtrlCreateRadio("One", 40, 176, 105, 17,$BS_AUTORADIOBUTTON) GUICtrlCreateGroup("", -99, -99, 1, 1) $main1_rad1= GUICtrlCreateRadio("These", 272, 56, 81, 17) $main1_rad2= GUICtrlCreateRadio("These", 272, 40, 81, 17) $main1_rad3= GUICtrlCreateRadio("These", 272, 72, 81, 17) $main1_rad4 = GUICtrlCreateCheckbox("Check", 176, 72, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) ;$Group2 = GUICtrlCreateGroup("That", 8, 136, 377, 89) $main2_rad1 = GUICtrlCreateRadio("These", 264, 160, 81, 17) $main2_rad2= GUICtrlCreateRadio("These", 264, 176, 81, 17) $main2_rad3 = GUICtrlCreateRadio("These", 264, 192, 81, 17) $main2_rad4 = GUICtrlCreateCheckbox("Check", 176, 192, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Exit", 128, 248, 121, 33) GUICtrlSetState ( $Main1_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad4, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad4, $GUI_DISABLE ) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE or $msg = $Button1 ExitLoop Case $msg = $main1 If BitOr (GuiCtrlRead ($main1), $GUI_CHECKED) then GUICtrlSetState ( $Main1_rad1, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad2, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad3, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad4, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad4, $GUI_DISABLE ) Endif Case $msg = $main2 If Bitor (GuiCtrlRead ($main2), $GUI_CHECKED) then GUICtrlSetState ( $Main2_rad1, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad2, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad3, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad4, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad4, $GUI_DISABLE ) Endif Case Else ;;;;;;; EndSelect WEnd Exit [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
slightly_abnormal Posted May 28, 2006 Author Share Posted May 28, 2006 Yes.. thanks! Link to comment Share on other sites More sharing options...
ChrisL Posted May 28, 2006 Share Posted May 28, 2006 I think it should have been BitAnd not BitOr, Also did you want it to remove the check if one was previously selected? expandcollapse popup#include <GUIConstants.au3> $Form1 = GUICreate("Radios", 391, 294, 192, 125) $Group1 = GUICtrlCreateGroup("This", 8, 16, 377, 89) $Main1 = GUICtrlCreateRadio("One", 40, 48, 97, 17,$BS_AUTORADIOBUTTON) $Main2 = GUICtrlCreateRadio("One", 40, 176, 105, 17,$BS_AUTORADIOBUTTON) GUICtrlCreateGroup("", -99, -99, 1, 1) $main1_rad1= GUICtrlCreateRadio("These", 272, 56, 81, 17) $main1_rad2= GUICtrlCreateRadio("These", 272, 40, 81, 17) $main1_rad3= GUICtrlCreateRadio("These", 272, 72, 81, 17) $main1_rad4 = GUICtrlCreateCheckbox("Check", 176, 72, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) ;$Group2 = GUICtrlCreateGroup("That", 8, 136, 377, 89) $main2_rad1 = GUICtrlCreateRadio("These", 264, 160, 81, 17) $main2_rad2= GUICtrlCreateRadio("These", 264, 176, 81, 17) $main2_rad3 = GUICtrlCreateRadio("These", 264, 192, 81, 17) $main2_rad4 = GUICtrlCreateCheckbox("Check", 176, 192, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Exit", 128, 248, 121, 33) GUICtrlSetState ( $Main1_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad4, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad4, $GUI_DISABLE ) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE or $msg = $Button1 ExitLoop Case $msg = $main1 If BitAnd (GuiCtrlRead ($main1), $GUI_CHECKED) then GUICtrlSetState ( $Main1_rad1, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad2, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad3, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad4, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad1, $GUI_UNCHECKED) GUICtrlSetState ( $Main2_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad2, $GUI_UNCHECKED) GUICtrlSetState ( $Main2_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad3, $GUI_UNCHECKED) GUICtrlSetState ( $Main2_rad4, $GUI_DISABLE ) GUICtrlSetState ( $Main2_rad4, $GUI_UNCHECKED) Endif Case $msg = $main2 If BitAnd (GuiCtrlRead ($main2), $GUI_CHECKED) then GUICtrlSetState ( $Main2_rad1, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad2, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad3, $GUI_ENABLE ) GUICtrlSetState ( $Main2_rad4, $GUI_ENABLE ) GUICtrlSetState ( $Main1_rad1, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad1, $GUI_UNCHECKED ) GUICtrlSetState ( $Main1_rad2, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad2, $GUI_UNCHECKED ) GUICtrlSetState ( $Main1_rad3, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad3, $GUI_UNCHECKED ) GUICtrlSetState ( $Main1_rad4, $GUI_DISABLE ) GUICtrlSetState ( $Main1_rad4, $GUI_UNCHECKED ) Endif Case Else ;;;;;;; EndSelect WEnd Exit [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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