Demonstrate the use of RadioButtonGroup tool

Demonstrate the use of RadioButtonGroup tool

Demonstrate the use of RadioButtonGroup tool

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

DownloadDownload This Tutorials

Bookmark:

Demonstrate the use of RadioButtonGroup tool

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

demonstrates how to use FOR loop in Delphi

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 Delphi Tutorials.

Download materials for this article (Delphi - Tutorials)

Download - Radio-Button.zipRadio-Button.zip
       File size: 4 KB, File type: zip
       Total downloads: 186, Upload date: February 02 - 2009

Mabrouk :: May 15-2009 :: 12:34 AM

Dear  Sir

Thank  you..

Leave a comment