Re: RadioButton - Making a choice and continuing

Posted by Lionel on February 27, 2006

In Reply to Re: RadioButton - Making a choice and continuing posted by webmaster Guido on February 27, 2006

: while (not RadioButton1.Checked) and
: (not RadioButton2.Checked) do begin
: ShowMessage('You forgot to check your selection');
: Application.ProcessMessages;
: end;
: if RadioButton1.checked then begin
: Radius := Edit2.Text;
: Tangent := Radius * Tan(X/2);
: end
: else begin
: Tangent :=Edit3.Text;
: Radius := Tangent / Tan(X/2);
: end;

Thanks for the help,
I tried the above and if the user does not make a selection and you execute the application, the message comes up saying 'You forgot to check your selection' which is good and is doing what it should but then the application hangs up and will not let you make a selection or continue. ---- At this point the user has no choice but to shut down and start over. I thought that using two RadioButtons and two Edit Boxes would be a good and simple way to make a selection but its not working out the way I expected.
-------------------------------------
Am I trying to use the wrong approach to handling this selection process what do you think?
Regards,
Lionel
-------------------------------------------

Related Articles and Replies