Как перевести свой тип данных в String или Integer?
type
Phone = (buttons, numerous, sensor);
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
end;
var
Form1: TForm1;
MyPhone: Phone;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
MyPhone := sensor;
label1.Caption := MyPhone;
end;
end.
label1.Caption:=integer(MyPhone);
- в string:label1.Caption:=IntToStr(integer(MyPhone));