Jump to content

Different sets of radios?


Minikori
 Share

Recommended Posts

Hello, I searched the forum, and couldn't really find the answer to my question. How do I seperate sets of radio buttons? Here's my code:

#include <GUIConstantsEx.au3>

;$JCDir = FileSelectFolder("Select your JellyCar directory", "C:\")
;If $JCDir = "" Then Exit
;$Car = FileOpen($JCDir & "\Assets\Cars\car_and_truck.car", 1)

GUICreate("JellyPatcher", 200, 300)

$Tabs = GUICtrlCreateTab(0, 0, 200, 300)
$CarTab = GUICtrlCreateTabItem("Car")
GUICtrlCreateLabel("Wheels", 10, 25)
$TireFast = GUICtrlCreateCheckbox("5x Speed", 10, 40)
$MoreTorque = GUICtrlCreateCheckbox("99 Torque", 10, 60)
$TinyWheels = GUICtrlCreateCheckbox("Tiny Truck Wheels", 10, 80)
$BigWheels = GUICtrlCreateCheckbox("Big Car Wheels", 10, 100)
GUICtrlCreateLabel("Body", 10, 130)
$CarTruck = GUICtrlCreateCheckbox("Car is Truck", 10, 145)
$TruckCar = GUICtrlCreateCheckbox("Truck is Car", 10, 165)
$CarRect = GUICtrlCreateCheckbox("Car is Rectangle", 10, 185)
$TruckRect = GUICtrlCreateCheckbox("Truck is Rectangle", 10, 205)
$Patch = GUICtrlCreateButton("Patch!", 10, 245, 180, 30)


GUISetState()
While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
        ExitLoop
    EndSwitch
WEnd
Exit

Func temp($sString, $iLeft, $iRight)
    $s = StringTrimLeft($sString, $iLeft)
    $s = StringTrimRight($sString, $iRight)
    Return $s
EndFunc

I want $CarTruck and $TruckRect to be able to be selected at the same time, but not $CarTruck and $CarRect. How do I do this?

EDIT: They're checkboxes is my example but I want them to be radios.

Edited by Minikori

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

If you want visible groups, then do something like this.

GUICreate("", 100, 135)
GUICtrlCreateGroup("Group 1", 5, 5, 90, 60)
GUICtrlCreateRadio("radio1", 15, 20)
GUICtrlCreateRadio("radio2", 15, 40)
GUICtrlCreateGroup("Group 2", 5, 70, 90, 60)
GUICtrlCreateRadio("radio3", 15, 85)
GUICtrlCreateRadio("radio4", 15, 105)
GUISetState()

While 1
    Sleep(100)
WEnd

If you want invisible groups, do something like this.

GUICreate("", 100, 135)
GUIStartGroup()
GUICtrlCreateRadio("radio1", 15, 20)
GUICtrlCreateRadio("radio2", 15, 40)
GUIStartGroup()
GUICtrlCreateRadio("radio3", 15, 85)
GUICtrlCreateRadio("radio4", 15, 105)
GUISetState()

While 1
    Sleep(100)
WEnd

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

Thank you, it works.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

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