How to Have Several Radiobuttons with Only One Selectable
Keywords: default radiobuttons
Question:
How can I set up a dialog to have radiobuttons, but only the first one selected by default, and
only one selectable at a time?
Answer:
You have to specify one variable for all the radiobuttons, and then the one you want selected
by default, number 1 in the last parameter. Every radiobutton thereafter will be numbered sequentially,
as in the following example:
MyDialogFormat=`WWWDLGED,5.0`
MyDialogCaption=`WIL Dialog`
MyDialogX=48
MyDialogY=65
MyDialogWidth=304
MyDialogHeight=193
MyDialogNumControls=6
MyDialog01=`25,19,51,DEFAULT,RADIOBUTTON,drive1,"Enabled",1`
MyDialog02=`25,38,51,DEFAULT,RADIOBUTTON,drive1,"Disabled",2`
MyDialog03=`25,57,51,DEFAULT,RADIOBUTTON,drive1,"Enabled",3`
MyDialog04=`25,78,51,DEFAULT,RADIOBUTTON,drive1,"Disabled",4`
MyDialog05=`25,100,51,DEFAULT,RADIOBUTTON,drive1,"Enabled",5`
MyDialog06=`64,142,51,DEFAULT,PUSHBUTTON,DEFAULT,"Cancel",1`
ButtonPushed=Dialog("MyDialog")
Article ID: W12854
Filename: Radiobuttons - Several with Only One Selected.txt