|
This example demonstrate the use of RadioButtonGroup tool.
You can select mathematical calculation from the option list.

Download this example
Here
is how you setup Calculate button on click event.
procedure TForm1.Button1Click(Sender: TObject);
Var
V1, V2, V : Variant;
N1, N2 : Real;
begin
V1:=Edit1.Text;
V2:=Edit2.Text;
N1:=Real(V1);
N2:=Real(V2);
V:=0;
{
Checking which radio button is selected
....}
If RadioButton1.Checked Then
V:=N1+N2
Else If RadioButton2.Checked Then
V:=N1-N2
Else If RadioButton3.Checked Then
V:=N1*N2
Else
V:=N1/N2;
Label4.Caption:=V;
end;
DOWNLOAD this example
Click
here
to download this complete example for Delphi 6. (File size 4 KB)

|