Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Button will not work 1

Status
Not open for further replies.

PackRat1

Technical User
Mar 22, 2006
50
US
No matter what I do I always get 1..... Any see what I am doing wrong?

Code:
integer iEdd
integer selection
string sSite
string showme


sdlginput "SITE LOCATION" "INPUT SITE NAME:" sSite

dialogbox 0 11 23 122 19 131 "PERFORM AN EDD?" 
   radiogroup 1 iEdd
      radiobutton 2 2 2 40 9 "&YES"
      radiobutton 3 74 2 42 11 "&NO" 
   endgroup
enddialog 

while 1

	dlgevent 0 selection 
	  switch selection 
		  case 0 
		    endcase
		  case 2 
                  case 3
		     endcase
		  default 
exitwhile 		
		endcase
	endswitch
	endwhile
dlgdestroy 0 CANCEL	

switch selection 
      case 2
         showme = "The YES option button"
      endcase
      case 3
         showme = "The NO option button"
      endcase
endswitch
  
usermsg " %s was selected." showme

usermsg "%i is the value of the variable" selection

PAUSE 20

The last switch and the two usermsg are for troubleshooting.
 
Actually you want to switch on iEdd (this variable will hold the radiobutton selected) instead of the selection variable. You'll also need to make this change in the final usermsg command.

 
I have changed both of the switch's to iEdd and now the dialogbox just sits there no matter which one I click on.
If I close the box I'm thrown into Lala Land somewhere.
 
Thanks works perfectly. Trying to teach myself Aspect as I go. Some of the help files are not very clear in the formatting and syntax areas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top