unit U_inicial;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;

type
  TForm1 = class(TForm)
    cb_Periodo: TComboBox;
    cb_curso: TComboBox;
    txt_valor: TEdit;
    txt_total: TEdit;
    rg_pagamento: TRadioGroup;
    bt_salvar: TButton;
    bt_limpar: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    procedure cb_PeriodoChange(Sender: TObject);
    procedure cb_cursoChange(Sender: TObject);
    procedure rg_pagamentoClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.cb_cursoChange(Sender: TObject);
begin
  if cb_curso.Text = 'Fotografia' then
  begin
    txt_valor.Text := '400' ;
  end
  else
  if cb_curso.Text = 'Culinária' then
  begin
    txt_valor := '150' ;
  end
  else
  if cb_curso.Text = 'Modelo manequim' then
  begin
    txt_valor.Text := '200' ;
  end;
  if cb_curso.Text = 'Eletrônica' then
  begin
    txt_valor.Text := '450' ;
  end;
  if cb_curso.Text = 'Ufologia' then
  begin
    txt_valor.Text := '900' ;
  end;



end;

procedure TForm1.cb_PeriodoChange(Sender: TObject);
begin
  cb_curso.Clear;

  if cb_Periodo.ItemIndex = 0 then
    begin
      cb_curso.Items.Add('Fotografia');
      cb_curso.Items.Add('Culinária');
    end
    else
  if cb_Periodo.ItemIndex = 1 then
    begin
      cb_curso.Items.Add('Informática');
      cb_curso.Items.Add('Modelo manequim');
    end
    else
  if cb_periodo.ItemIndex = 2 then
    begin
      cb_curso.Items.Add('Eletrônica');
      cb_curso.Items.Add('Ufologia');
    end


end;

procedure TForm1.rg_pagamentoClick(Sender: TObject);
  var  valor : double;
begin
  valor := strtofloat(txt_valor.Text);
end;
end.
