WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 1999:04:15:16:50:06
Last Updated: 1999:04:15:16:50:06