procedure TForm1.Button1Click(Sender: TObject); var ti: PTypeInfo; td: PTypeData; i: Integer; begin ti := TypeInfo(TTest); td := GetTypeData(ti); for i := td^.MinValue to td^.MaxValue do ListBox1.Items.Add(GetEnumName(ti, i)); end;
uses TypInfo; type TStatus = (Active, Passive,Waiting);
procedure TForm1.Button1Click(Sender: TObject); var ti: PTypeInfo; td: PTypeData; i: Integer; begin ti := TypeInfo(TStatus); td := GetTypeData(ti); for i := td^.MinValue to td^.MaxValue do ListBox1.Items.Add(GetEnumName(ti, i)); end;
TypInfo;type
TStatus = (Active, Passive,Waiting);
procedure TForm1.Button1Click(Sender: TObject);
var
ti: PTypeInfo;
td: PTypeData;
i: Integer;
begin
ti := TypeInfo(TTest);
td := GetTypeData(ti);
for i := td^.MinValue to td^.MaxValue do
ListBox1.Items.Add(GetEnumName(ti, i));
end;
TypInfo; type
TStatus = (Active, Passive,Waiting);
procedure TForm1.Button1Click(Sender: TObject);
var
ti: PTypeInfo;
td: PTypeData;
i: Integer;
begin
ti := TypeInfo(TStatus);
td := GetTypeData(ti);
for i := td^.MinValue to td^.MaxValue do
ListBox1.Items.Add(GetEnumName(ti, i));
end;