Get currently selected Combobox value and use it as variable

Not sure if the TryStrToFloat is already in Delphi 7, but if yes I would do it this way.

procedure TForm1.ComboBox1Change(Sender: TObject);
var
  Value: Double;
begin
  if TryStrToFloat(ComboBox1.Text, Value) then
    T := T + Value
  else
    ShowMessage('You''ve entered wrong value ...');
end;

// ItemIndex is the index of the selected item
// If no item is selected, the value of ItemIndex is -1
if (ComboBox1.ItemIndex >= 0) then
begin
  t := t + StrToFloat(ComboBox1.Items[ComboBox1.ItemIndex]);
end;