OWBasic for Pocketviewer

Home INTRO Group FORM Alphabetical Index

Radiobuttons in Forms

A radiobutton allows the selection of one option from multiple options. More than one radiobuttons have to be combined in a group for this. All these radiobuttons of a group have to have the same main value for the selector , but different subvalues. The type number for a radiobutton is 2.

Every time a radiobutton is selected it returns it's selector and all other radiobuttons of the group are deactivated.

Example:
	forminit
	! one group of radiobuttons
	formentry "One",  5,30,65,44, 2, 10
	formentry "Two",  5,50,65,64, 2, 11
	formentry "Three",5,70,65,84, 2, 12
	! a second group of radiobuttons
	formentry "Alpha",  95,30,145,44, 2, 20
	formentry "Beta",  95,50,145,64, 2, 21
	formentry "Gamma",95,70,145,84, 2, 22
	
	formdisplay
$m1
	formtouch sel
	messagebox "Selected:"+string(sel)
	goto m1


Home INTRO Group FORM Alphabetical Index